---
id: object/codeunit/410
type: object
title: Codeunit 410 "Update Analysis View"
summary: Codeunit 410 "Update Analysis View" in Base Application (Microsoft.Finance.Analysis). 13 public procedures, 18 events. Present since at least BC23, still in BC30, changed in BC24-25.
tier: official
language: en
tags:
  - codeunit
  - base application
versions:
  introduced: null
  last_changed: "25"
  deprecated: null
review:
  state: derived
  by: null
  at: null
  flags: []
generated:
  at: "2026-10-11T00:31:51.816Z"
  pipeline: 0.2.0
  prompts: {}
  input_hash: 53b39d867e1734f173b1c17d404014da910f20881a68fc64550e0b3555fcbeaf
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/W1/BaseApp/Finance/Analysis/UpdateAnalysisView.Codeunit.al
    title: src/Layers/W1/BaseApp/Finance/Analysis/UpdateAnalysisView.Codeunit.al (releases/29.x)
    date: null
    commit: ea08af5ef2d6a9b5c5af4a029288abbe2c883220
    t: null
    quote: null
links:
  learn: []
  objects: []
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
object_type: codeunit
object_id: 410
name: Update Analysis View
namespace: Microsoft.Finance.Analysis
app: Base Application
extends: null
first_version: "23"
last_version: "30"
present_in:
  - "23"
  - "24"
  - "25"
  - "26"
  - "27"
  - "28"
  - "29"
  - "30"
changed_in:
  - "24"
  - "25"
source_major: "29"
obsolete: null
countries: []
ms_search_form_ids: []
counts:
  fields: 0
  procedures: 41
  events: 18
  subscribers: 0
relations:
  out: 1
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 7
  calls: 0
  called_by: 40
  implements: 0
---

# Codeunit 410 "Update Analysis View"

> Codeunit 410 "Update Analysis View" in Base Application (Microsoft.Finance.Analysis). 13 public procedures, 18 events. Present since at least BC23, still in BC30, changed in BC24-25.

Base Application · Microsoft.Finance.Analysis · BC23-30 · [source at ea08af5e](https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/W1/BaseApp/Finance/Analysis/UpdateAnalysisView.Codeunit.al) · facts from BC29

## Properties

| Property | Value |
|---|---|
| TableNo | Analysis View |
| Permissions | TableData "G/L Entry" = r, TableData "G/L Budget Entry" = r, TableData "Analysis View" = rm, TableData "Analysis View Filter" = r, TableData "Analysis View Entry" = rimd, TableData "Analysis View Budget Entry" = rimd |

## Events published

- `OnAfterInitLastEntryNo(var LastGLEntryNo: Integer)` (integration): Integration event raised after initializing last entry number for analysis view updates. Allows modification of the starting entry number for update processing.
- `OnAfterUpdateAll(Which: Option "Ledger Entries","Budget Entries",Both; DirectlyFromPosting: Boolean)` (integration): Integration event raised after completing analysis view update operations. Enables post-update processing and cleanup activities.
- `OnBeforeUpdateAll(Which: Option "Ledger Entries","Budget Entries",Both; DirectlyFromPosting: Boolean; var AnalysisView: Record "Analysis View"; var InBatchPosting: Boolean)` (integration): Integration event raised before starting analysis view update operations. Allows preprocessing and modification of update parameters.
  - subscribers: [Codeunit 1371 "Sales Batch Post Mgt."](../codeunit/1371.md) OnBeforeUpdateAnalysisView, [Codeunit 1372 "Purchase Batch Post Mgt."](../codeunit/1372.md) OnBeforeUpdateAnalysisView
- `OnBeforeUpdateOne(var NewAnalysisView: Record "Analysis View"; Which: Option "Ledger Entries","Budget Entries",Both; ShowWindow: Boolean; var IsHandled: Boolean)` (integration): Integration event raised before updating a single analysis view. Allows custom handling and preprocessing for individual analysis view updates.
- `OnBeforeUpdateEntriesForGLAccount(var TempAnalysisViewEntry: Record "Analysis View Entry" temporary; AnalysisView: Record "Analysis View"; LastGLEntryNo: Integer; var NoOfEntries: Integer; var IsHandled: Boolean; ShowProgressWindow: Boolean)` (integration): Integration event raised before updating entries for G/L account analysis views. Allows custom entry processing and modification of update parameters.
- `OnFlushAnalysisViewEntryOnBeforeAnalysisViewEntryInsert(var AnalysisViewEntry: Record "Analysis View Entry"; TempAnalysisViewEntry: Record "Analysis View Entry" temporary)` (integration): Integration event raised before inserting analysis view entries during flush operations. Allows modification of analysis view entries before they are permanently stored.
- `OnUpdateOneOnBeforeUpdateAnalysisView(var AnalysisView: Record "Analysis View"; var TempAnalysisViewEntry: Record "Analysis View Entry" temporary; var Updated: Boolean; ShowProgressWindow: Boolean)` (integration): Integration event raised before updating analysis view during single view update operations. Allows custom processing and modification of analysis view update parameters.
- `OnUpdateOneOnBeforeNewAnalysisViewIncludeBudgetsCheck(var NewAnalysisView: Record "Analysis View"; var AnalysisView: Record "Analysis View"; Which: Option "Ledger Entries","Budget Entries",Both)` (integration): Integration event raised before checking if new analysis view includes budgets during update process. Enables custom validation logic for budget inclusion in analysis view updates.
- `OnUpdateOneOnBeforeUpdateEntries(var AnalysisView: Record "Analysis View"; Which: Option "Ledger Entries","Budget Entries",Both; LastGLEntryNo: Integer)` (integration): Integration event raised before starting analysis view entry updates. Enables custom logic before analysis view entries are processed and updated.
- `OnUpdateBudgetEntriesOnAfterGLBudgetEntrySetFilters(var GLBudgetEntry: Record "G/L Budget Entry"; var AnalysisView: Record "Analysis View")` (integration): Integration event raised after setting filters on G/L Budget Entry during budget update process. Enables additional filtering logic for budget entries being processed.
- `OnUpdateEntriesForGLAccountDetailedOnAfterGLEntrySetFilters(var GLEntry: Record "G/L Entry"; var AnalysisView: Record "Analysis View")` (integration): Integration event raised after setting filters on G/L Entry during detailed G/L account update. Enables additional filtering logic for detailed G/L entry processing.
- `OnUpdateEntriesForGLAccountOnAfterAnalysisViewGLQrySetFilters(var AnalysisViewSourceQry: Query "Analysis View Source"; var AnalysisView: Record "Analysis View")` (integration): Integration event raised after setting filters on Analysis View Source query during G/L account update. Enables custom query filtering for analysis view source data processing.
- `OnUpdateAnalysisViewBudgetEntryOnAfterTempAnalysisViewBudgetEntryAssignment(var TempAnalysisViewBudgetEntry: Record "Analysis View Budget Entry"; var AnalysisView: Record "Analysis View"; var GLBudgetEntry: Record "G/L Budget Entry"; DimValue1: Code[20]; DimValue2: code[20]; DimValue3: Code[20]; DimValue4: Code[20])` (integration): Integration event raised after assigning values to temporary Analysis View Budget Entry during update. Enables modification of budget entry data before final processing.
- `OnAfterCalculatePeriodStart(var AnalysisView: Record "Analysis View"; DateCompression: Integer; var AccountingPeriod: Record "Accounting Period"; var PostingDate: Date; var PrevCalculatedPostingDate: Date; PrevPostingDate: Date)` (integration): Integration event raised after calculating period start date for analysis view updates. Enables custom period calculation logic for different date compression methods.
- `OnBeforeUpdateOneUpdateEntries(var NewAnalysisView: Record "Analysis View"; Which: Option "Ledger Entries","Budget Entries",Both; var LastReportedEntryNo: Integer; var TableID: Integer; var Supproted: Boolean)` (integration): Integration event raised before updating entries during single analysis view update process. Enables pre-update validation and custom entry processing logic.
  - subscribers: [Codeunit 2621 "Stat. Acc. Analysis View Mgt."](../codeunit/2621.md) HandleOnUpdateOneOnBeforeUpdateEntries, [Codeunit 6239 "Sust. Acc. Analysis View Mgt."](../codeunit/6239.md) HandleOnUpdateOneOnBeforeUpdateEntries
- `OnGetEntriesForUpdate(var AnalysisView: Record "Analysis View"; var UpdAnalysisViewEntryBuffer: Record "Upd Analysis View Entry Buffer")` (integration): Integration event for retrieving entries to update in analysis view processing. Enables custom entry retrieval logic and filtering for analysis view updates.
  - subscribers: [Codeunit 2621 "Stat. Acc. Analysis View Mgt."](../codeunit/2621.md) HandleOnGetEntriesForUpdate, [Codeunit 6239 "Sust. Acc. Analysis View Mgt."](../codeunit/6239.md) HandleOnGetEntriesForUpdate
- `OnUpdateAllOnAfterFilterAnalysisView2(var AnalysisView: Record "Analysis View"; DirectlyFromPosting: Boolean; LastBudgetEntryNo: Integer)` (integration): Integration event raised after filtering Analysis View records during update all process. Enables additional processing logic after analysis view filtering is complete.
- `OnUpdateAnalysisViewEntryOnAfterTempAnalysisViewEntryAssignment(var TempAnalysisViewEntry: Record "Analysis View Entry" temporary; var AnalysisView: Record "Analysis View"; var GLEntry: Record "G/L Entry"; var UpdAnalysisViewEntryBuffer: Record "Upd Analysis View Entry Buffer")` (integration): Integration event raised after assigning values to temporary Analysis View Entry during update. Enables modification of analysis view entry data before final processing.
  - subscribers: [Codeunit 6239 "Sust. Acc. Analysis View Mgt."](../codeunit/6239.md) OnUpdateAnalysisViewEntryOnAfterTempAnalysisViewEntryAssignment

## Procedures

- `UpdateAll(Which: Option "Ledger Entries","Budget Entries",Both; DirectlyFromPosting: Boolean)`: Updates all analysis views that require updating based on specified entry types.
- `UpdateAll(var AnalysisView2: Record "Analysis View"; Which: Option "Ledger Entries","Budget Entries",Both; DirectlyFromPosting: Boolean)` (internal)
- `Update(var NewAnalysisView: Record "Analysis View"; Which: Option "Ledger Entries","Budget Entries",Both; ShowWindow: Boolean)`: Updates a single analysis view with data from the specified entry types.
- `UpdateAnalysisViewEntry(AccNo: Code[20]; BusUnitCode: Code[20]; CashFlowForecastNo: Code[20]; DimValue1: Code[20]; DimValue2: Code[20]; DimValue3: Code[20]; DimValue4: Code[20]; PostingDate: Date; Amount: Decimal; DebitAmount: Decimal; CreditAmount: Decimal; AmountACY: Decimal; DebitAmountACY: Decimal; CreditAmountACY: Decimal; EntryNo: Integer)`: Updates analysis view entry with individual transaction data from G/L or Cash Flow entries. Stages transaction data in buffer for aggregation into final analysis view entries.
- `UpdateAnalysisViewEntry(UpdAnalysisViewEntryBuffer: Record "Upd Analysis View Entry Buffer")`: Updates analysis view entry using buffer record with date compression and aggregation logic. Processes buffer data with period start calculation and dimension aggregation rules.
- `CalculatePeriodStart(PostingDate: Date; DateCompression: Integer): Date`: Calculates the period start date based on the posting date and date compression setting. Adjusts the date to align with analysis view period boundaries.
- `FlushAnalysisViewEntry()`: Flushes accumulated analysis view entries from temporary storage to the database. Processes temporary analysis view entries and inserts them as permanent records.
- `FlushAnalysisViewBudgetEntry()`: Flushes accumulated analysis view budget entries from temporary storage to the database. Processes temporary budget entries and inserts them as permanent records.
- `GetDimVal(DimCode: Code[20]; DimSetID: Integer): Code[20]`: Retrieves dimension value code for a specific dimension from a dimension set. Uses temporary caching to optimize repeated dimension value lookups during analysis view updates.
- `UpdateWindowCounter(EntryNo: Integer)`: Updates progress window counter during analysis view update operations. Tracks processing progress and updates user interface with percentage completion.
- `UpdateWindowHeader(TableID: Integer; EntryNo: Integer)`: Updates progress window header information during analysis view update operations. Displays current table being processed and entry numbers for user feedback.
- `SetLastBudgetEntryNo(NewLastBudgetEntryNo: Integer)`: Sets the last budget entry number processed for analysis view updates. Updates the analysis view record with the latest processed budget entry number to track update progress.
- `DimSetIDInFilter(DimSetID: Integer; var AnalysisView: Record "Analysis View"): Boolean`: Determines whether a dimension set ID matches the analysis view's dimension filters. Validates that all dimension values in the set comply with analysis view filtering criteria.

Plus 10 local procedures.

## Triggers

OnRun

## Relations

- runs on [Table 363 "Analysis View"](../table/363.md)

## Called by

From the extracted call graph of BC29 (graphify-al on the snapshot checkout): calls whose target is known from a declared type or an `Object::"Name"` argument. Interface dispatch and calls through events are not counted, so the list is not complete.

- [Codeunit 2621 "Stat. Acc. Analysis View Mgt."](../codeunit/2621.md) (3 calls: `GetEntriesForUpdate → DimSetIDInFilter`, `GetEntriesForUpdate → GetDimVal`, `GetStatisticalLedgerEntry → DimSetIDInFilter`)
- [Table 363 "Analysis View"](../table/363.md) (3 calls: `CheckViewsAreUpdated → Update`, `SetUpdateOnPosting → (object)`, `UpdateAllAnalysisViews → Update`)
- [Codeunit 413 "AnalysisViewEntryToGLEntries"](../codeunit/413.md) (2 calls: `GetCFLedgEntries → DimSetIDInFilter`, `GetGLEntries → DimSetIDInFilter`)
- [Codeunit 6239 "Sust. Acc. Analysis View Mgt."](../codeunit/6239.md) (2 calls: `GetEntriesForUpdate → DimSetIDInFilter`, `GetEntriesForUpdate → GetDimVal`)
- [Page 120 "G/L Budget Entries"](../page/120.md) (2 calls: `OnDeleteRecord → SetLastBudgetEntryNo`, `OnModifyRecord → SetLastBudgetEntryNo`)
- [Codeunit 1013 "Job Jnl.-Post Batch"](../codeunit/1013.md) (1 call: `Code → UpdateAll`)
- [Codeunit 13 "Gen. Jnl.-Post Batch"](../codeunit/13.md) (1 call: `ProcessLines → UpdateAll`)
- [Codeunit 1371 "Sales Batch Post Mgt."](../codeunit/1371.md) (1 call: `OnRun → UpdateAll`)
- [Codeunit 1372 "Purchase Batch Post Mgt."](../codeunit/1372.md) (1 call: `OnRun → UpdateAll`)
- [Codeunit 1690 "Bank Deposit-Post"](../codeunit/1690.md) (1 call: `OnRun → UpdateAll`)
- [Codeunit 17 "Gen. Jnl.-Post Reverse"](../codeunit/17.md) (1 call: `Reverse → UpdateAll`)
- [Codeunit 213 "Res. Jnl.-Post Batch"](../codeunit/213.md) (1 call: `RunUpdateAnalysisView → UpdateAll`)
- [Codeunit 224 "EmplEntry-Apply Posted Entries"](../codeunit/224.md) (1 call: `EmplPostApplyEmplLedgEntry → UpdateAll`)
- [Codeunit 226 "CustEntry-Apply Posted Entries"](../codeunit/226.md) (1 call: `RunUpdateAnalysisView → UpdateAll`)
- [Codeunit 227 "VendEntry-Apply Posted Entries"](../codeunit/227.md) (1 call: `RunUpdateAnalysisView → UpdateAll`)
- [Codeunit 23 "Item Jnl.-Post Batch"](../codeunit/23.md) (1 call: `Code → UpdateAll`)
- [Codeunit 2584 "Dim Corr Analysis View"](../codeunit/2584.md) (1 call: `UpdateSelectedAnalysisViews → Update`)
- [Codeunit 367 "CheckManagement"](../codeunit/367.md) (1 call: `FinancialVoidCheck → UpdateAll`)
- [Codeunit 370 "Bank Acc. Reconciliation Post"](../codeunit/370.md) (1 call: `FinalizePost → UpdateAll`)
- [Codeunit 406 "Update Analysis View Backgr."](../codeunit/406.md) (1 call: `OnRun → UpdateAll`)
- [Codeunit 5633 "FA Jnl.-Post Batch"](../codeunit/5633.md) (1 call: `Code → UpdateAll`)
- [Codeunit 5653 "Insurance Jnl.-Post Batch"](../codeunit/5653.md) (1 call: `Code → UpdateAll`)
- [Codeunit 5704 "TransferOrder-Post Shipment"](../codeunit/5704.md) (1 call: `RunWithCheck → UpdateAll`)
- [Codeunit 5705 "TransferOrder-Post Receipt"](../codeunit/5705.md) (1 call: `RunWithCheck → UpdateAll`)
- [Codeunit 5822 "Cost Adjustment Bucket Runner"](../codeunit/5822.md) (1 call: `OnRun → UpdateAll`)
- [Codeunit 5823 "Cost Adjustment Item Runner"](../codeunit/5823.md) (1 call: `OnRun → UpdateAll`)
- [Codeunit 5850 "Invt. Doc.-Post Receipt"](../codeunit/5850.md) (1 call: `OnRun → UpdateAll`)
- [Codeunit 5851 "Invt. Doc.-Post Shipment"](../codeunit/5851.md) (1 call: `OnRun → UpdateAll`)
- [Codeunit 5856 "TransferOrder-Post Transfer"](../codeunit/5856.md) (1 call: `RunWithCheck → UpdateAll`)
- [Codeunit 5980 "Service-Post"](../codeunit/5980.md) (1 call: `PostWithLines → UpdateAll`)
- [Codeunit 6235 "AnalysisViewEntryToSustEntries"](../codeunit/6235.md) (1 call: `GetSustLedgEntries → DimSetIDInFilter`)
- [Codeunit 699 "Exch. Rate Adjmt. Process"](../codeunit/699.md) (1 call: `OnRun → UpdateAll`)
- [Codeunit 80 "Sales-Post"](../codeunit/80.md) (1 call: `RunWithCheck → UpdateAll`)
- [Codeunit 844 "Cash Flow Wksh.-Register Batch"](../codeunit/844.md) (1 call: `Code → UpdateAll`)
- [Codeunit 90 "Purch.-Post"](../codeunit/90.md) (1 call: `CommitAndUpdateAnalysisVeiw → UpdateAll`)
- [Page 113 "Budget"](../page/113.md) (1 call: `DeleteBudget → SetLastBudgetEntryNo`)
- [Report 1002 "Post Inventory Cost to G/L"](../report/1002.md) (1 call: `OnPostReport → UpdateAll`)
- [Report 27 "Dimensions - Total"](../report/27.md) (1 call: `OnPreReport → (object)`)
- [Report 795 "Adjust Cost - Item Entries"](../report/795.md) (1 call: `RunCostAdjustment → UpdateAll`)
- [Report 94 "Close Income Statement"](../report/94.md) (1 call: `OnPostReport → UpdateAll`)

## Across versions

- Present in: BC23-30
- Changed (declaration) in: BC24-25

Source: AL metadata extracted from the code (names, ids, signatures, properties); no code bodies (D10).

## Ask your agent

Procedure bodies are not stored here (D10). The call sections above are our own, per object, from the BC29 call graph. For a procedure body or the calls of one procedure, ask bc-code-atlas (external, by Stefan Maron, MIT; default corpus w1-28), which the bc-observatory plugin connects: `bcatlas_resolve_node(object_type: "codeunit", object_name: "Update Analysis View")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.
