---
id: object/codeunit/9070
type: object
title: Codeunit 9070 "Document Errors Mgt."
summary: Codeunit 9070 "Document Errors Mgt." in Base Application (Microsoft.Utilities). 21 public procedures, 2 events, 27 event subscribers. Present since at least BC23, still in BC30, changed in BC25.
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: 8ee69019b7451b5873711fd62289e90a4b5d62684dc99a5d7a8845f9c23a2261
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/W1/BaseApp/Utilities/DocumentErrorsMgt.Codeunit.al
    title: src/Layers/W1/BaseApp/Utilities/DocumentErrorsMgt.Codeunit.al (releases/29.x)
    date: null
    commit: ea08af5ef2d6a9b5c5af4a029288abbe2c883220
    t: null
    quote: null
links:
  learn: []
  objects: []
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes:
    - change/bcapps/9086
object_type: codeunit
object_id: 9070
name: Document Errors Mgt.
namespace: Microsoft.Utilities
app: Base Application
extends: null
first_version: "23"
last_version: "30"
present_in:
  - "23"
  - "24"
  - "25"
  - "26"
  - "27"
  - "28"
  - "29"
  - "30"
changed_in:
  - "25"
source_major: "29"
obsolete: null
countries: []
ms_search_form_ids: []
counts:
  fields: 0
  procedures: 52
  events: 2
  subscribers: 27
relations:
  out: 0
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 0
  calls: 2
  called_by: 49
  implements: 0
---

# Codeunit 9070 "Document Errors Mgt."

> Codeunit 9070 "Document Errors Mgt." in Base Application (Microsoft.Utilities). 21 public procedures, 2 events, 27 event subscribers. Present since at least BC23, still in BC30, changed in BC25.

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

## Properties

| Property | Value |
|---|---|
| SingleInstance | true |

## Events published

- `OnBeforeOnAfterGetCurrRecordPurchDocCheckFactbox(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean)` (integration)
- `OnBeforeOnAfterGetCurrRecordSalesDocCheckFactbox(var SalesHeader: Record "Sales Header"; var IsHandled: Boolean)` (integration)

## Event subscriptions

- OnInitializingNotificationWithDefaultState subscribes to Page "My Notifications" OnInitializingNotificationWithDefaultState
- OnModifyRecordEventSalesOrderSubform subscribes to Page "Sales Order Subform" OnModifyRecordEvent
- OnModifyRecordEventSalesInvoiceSubform subscribes to Page "Sales Invoice Subform" OnModifyRecordEvent
- OnModifyRecordEventSalesCrMemoSubform subscribes to Page "Sales Cr. Memo Subform" OnModifyRecordEvent
- OnModifyRecordEventSalesReturnOrderSubform subscribes to Page "Sales Return Order Subform" OnModifyRecordEvent
- OnAfterOnAfterGetRecordSalesOrder subscribes to Page "Sales Order" OnAfterOnAfterGetRecord
- OnAfterOnAfterGetRecordSalesInvoice subscribes to Page "Sales Invoice" OnAfterOnAfterGetRecord
- OnAfterOnAfterGetRecordSalesCreditMemo subscribes to Page "Sales Credit Memo" OnAfterOnAfterGetRecord
- OnAfterOnAfterGetRecordSalesReturnOrder subscribes to Page "Sales Return Order" OnAfterOnAfterGetRecord
- OnModifyRecordEventSalesOrder subscribes to Page "Sales Order" OnModifyRecordEvent
- OnModifyRecordEventSalesInvoice subscribes to Page "Sales Invoice" OnModifyRecordEvent
- OnModifyRecordEventSalesCreditMemo subscribes to Page "Sales Credit Memo" OnModifyRecordEvent
- OnModifyRecordEventSalesReturnOrder subscribes to Page "Sales Return Order" OnModifyRecordEvent
- OnAfterGetCurrRecordSalesDocCheckFactbox subscribes to Page "Sales Doc. Check Factbox" OnAfterGetCurrRecordEvent
- OnModifyRecordEventPurchaseOrderSubform subscribes to Page "Purchase Order Subform" OnModifyRecordEvent
- OnModifyRecordEventPurchaseInvoiceSubform subscribes to Page "Purch. Invoice Subform" OnModifyRecordEvent
- OnModifyRecordEventPurchaseCrMemoSubform subscribes to Page "Purch. Cr. Memo Subform" OnModifyRecordEvent
- OnModifyRecordEventPurchaseReturnOrderSubform subscribes to Page "Purchase Return Order Subform" OnModifyRecordEvent
- OnAfterOnAfterGetRecordPurchaseOrder subscribes to Page "Purchase Order" OnAfterOnAfterGetRecord
- OnAfterOnAfterGetRecordPurchaseInvoice subscribes to Page "Purchase Invoice" OnAfterOnAfterGetRecord
- OnAfterOnAfterGetRecordPurchaseCreditMemo subscribes to Page "Purchase Credit Memo" OnAfterOnAfterGetRecord
- OnAfterOnAfterGetRecordPurchaseReturnOrder subscribes to Page "Purchase Return Order" OnAfterOnAfterGetRecord
- OnModifyRecordEventPurchaseOrder subscribes to Page "Purchase Order" OnModifyRecordEvent
- OnModifyRecordEventPurchaseInvoice subscribes to Page "Purchase Invoice" OnModifyRecordEvent
- OnModifyRecordEventPurchaseCreditMemo subscribes to Page "Purchase Credit Memo" OnModifyRecordEvent
- OnModifyRecordEventPurchaseReturnOrder subscribes to Page "Purchase Return Order" OnModifyRecordEvent
- OnAfterGetCurrRecordPurchDocCheckFactbox subscribes to Page "Purch. Doc. Check Factbox" OnAfterGetCurrRecordEvent

## Procedures

- `GetNothingToPostErrorMsg(): Text`
- `GetModifiedSalesLineNo(): Integer`
- `GetModifiedPurchaseLineNo(): Integer`
- `SetModifiedSalesLine(var SalesLine: Record "Sales Line")`
- `SetModifiedPurchaseLine(var PurchaseLine: Record "Purchase Line")`
- `SetFullDocumentCheck(NewFullDocumentCheck: Boolean)`
- `GetFullDocumentCheck(): Boolean`
- `SetErrorMessages(var SourceTempErrorMessage: Record "Error Message" temporary)`
- `GetErrorMessages(var NewTempErrorMessage: Record "Error Message" temporary)`
- `BackgroundValidationEnabled(): Boolean`
- `CheckShowEnableBackgrValidationNotification(): Boolean`
- `EnableShowDocumentCheckFactbox(Notification: Notification)`
- `DontShowAgainEnableBackgroundValidationNotification(Notification: Notification)`
- `DisableBackgroundValidationNotification()`
- `EnableBackgroundValidationNotification()`
- `EnableShowDocumentCheckFactboxNotification()`
- `DisableShowDocumentCheckFactboxNotification()`
- `IsBackgroundValidationNotificationEnabled(): Boolean`
- `IsShowDocumentCheckFactboxNotificationEnabled(): Boolean`
- `GetEnableBackgroundValidationNotificationID(): Guid`
- `GetShowDocumentCheckFactboxNotificationID(): Guid`

Plus 2 local procedures.

## Triggers

OnRun

## Calls

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 9079 "Background Error Handling Mgt."](../codeunit/9079.md) (3 calls: `BackgroundValidationEnabled → BackgroundValidationFeatureEnabled`, `CheckShowEnableBackgrValidationNotification → BackgroundValidationFeatureEnabled`, `OnInitializingNotificationWithDefaultState → BackgroundValidationFeatureEnabled`)
- [Codeunit 1330 "Instruction Mgt."](../codeunit/1330.md) (2 calls: `IsBackgroundValidationNotificationEnabled → IsMyNotificationEnabled`, `IsShowDocumentCheckFactboxNotificationEnabled → IsMyNotificationEnabled`)

## Called by

- [Codeunit 6478 "Serv. Document Errors Mgt."](../codeunit/6478.md) (9 calls: `OnAfterGetCurrRecordServiceDocCheckFactbox → BackgroundValidationEnabled`, `OnAfterOnAfterGetRecordServiceCreditMemo → BackgroundValidationEnabled`, `OnAfterOnAfterGetRecordServiceInvoice → BackgroundValidationEnabled`, …)
- [Codeunit 9079 "Background Error Handling Mgt."](../codeunit/9079.md) (7 calls: `AfterValidateMyNotificationsDataCheck → GetShowDocumentCheckFactboxNotificationID`, `CollectPurchaseDocCheckParameters → GetFullDocumentCheck`, `CollectPurchaseDocCheckParameters → GetModifiedPurchaseLineNo`, …)
- [Codeunit 373 "Bank. Acc. Recon. Post Preview"](../codeunit/373.md) (5 calls: `IsSuccess → GetNothingToPostErrorMsg`, `PreviewStart → GetNothingToPostErrorMsg`, `ShowAllEntries → GetNothingToPostErrorMsg`, …)
- [Codeunit 5988 "Serv-Documents Mgt."](../codeunit/5988.md) (2 calls: `CheckSysCreatedEntry → GetNothingToPostErrorMsg`, `UpdateShptLinesOnInv → GetNothingToPostErrorMsg`)
- [Page 42 "Sales Order"](../page/42.md) (2 calls: `CheckShowBackgrValidationNotification → CheckShowEnableBackgrValidationNotification`, `SetControlVisibility → BackgroundValidationEnabled`)
- [Page 43 "Sales Invoice"](../page/43.md) (2 calls: `CheckShowBackgrValidationNotification → CheckShowEnableBackgrValidationNotification`, `SetControlAppearance → BackgroundValidationEnabled`)
- [Page 44 "Sales Credit Memo"](../page/44.md) (2 calls: `CheckShowBackgrValidationNotification → CheckShowEnableBackgrValidationNotification`, `SetControlAppearance → BackgroundValidationEnabled`)
- [Page 50 "Purchase Order"](../page/50.md) (2 calls: `CheckShowBackgrValidationNotification → CheckShowEnableBackgrValidationNotification`, `SetControlAppearance → BackgroundValidationEnabled`)
- [Page 51 "Purchase Invoice"](../page/51.md) (2 calls: `CheckShowBackgrValidationNotification → CheckShowEnableBackgrValidationNotification`, `SetControlAppearance → BackgroundValidationEnabled`)
- [Page 52 "Purchase Credit Memo"](../page/52.md) (2 calls: `CheckShowBackgrValidationNotification → CheckShowEnableBackgrValidationNotification`, `SetControlAppearance → BackgroundValidationEnabled`)
- [Page 5900 "Service Order"](../page/5900.md) (2 calls: `ActivateFields → BackgroundValidationEnabled`, `CheckShowBackgrValidationNotification → CheckShowEnableBackgrValidationNotification`)
- [Page 5933 "Service Invoice"](../page/5933.md) (2 calls: `ActivateFields → BackgroundValidationEnabled`, `CheckShowBackgrValidationNotification → CheckShowEnableBackgrValidationNotification`)
- [Page 5935 "Service Credit Memo"](../page/5935.md) (2 calls: `ActivateFields → BackgroundValidationEnabled`, `CheckShowBackgrValidationNotification → CheckShowEnableBackgrValidationNotification`)
- [Page 6630 "Sales Return Order"](../page/6630.md) (2 calls: `CheckShowBackgrValidationNotification → CheckShowEnableBackgrValidationNotification`, `SetControlAppearance → BackgroundValidationEnabled`)
- [Page 6640 "Purchase Return Order"](../page/6640.md) (2 calls: `CheckShowBackgrValidationNotification → CheckShowEnableBackgrValidationNotification`, `SetControlAppearance → BackgroundValidationEnabled`)
- [Codeunit 442 "Sales-Post Prepayments"](../codeunit/442.md) (1 call: `CheckPrepmtDoc → GetNothingToPostErrorMsg`)
- [Codeunit 444 "Purchase-Post Prepayments"](../codeunit/444.md) (1 call: `CheckPrepmtDoc → GetNothingToPostErrorMsg`)
- [Codeunit 5704 "TransferOrder-Post Shipment"](../codeunit/5704.md) (1 call: `CheckLines → GetNothingToPostErrorMsg`)
- [Codeunit 5705 "TransferOrder-Post Receipt"](../codeunit/5705.md) (1 call: `CheckLines → GetNothingToPostErrorMsg`)
- [Codeunit 5760 "Whse.-Post Receipt"](../codeunit/5760.md) (1 call: `Code → GetNothingToPostErrorMsg`)
- [Codeunit 5763 "Whse.-Post Shipment"](../codeunit/5763.md) (1 call: `Code → GetNothingToPostErrorMsg`)
- [Codeunit 5850 "Invt. Doc.-Post Receipt"](../codeunit/5850.md) (1 call: `OnRun → GetNothingToPostErrorMsg`)
- [Codeunit 5851 "Invt. Doc.-Post Shipment"](../codeunit/5851.md) (1 call: `OnRun → GetNothingToPostErrorMsg`)
- [Codeunit 5856 "TransferOrder-Post Transfer"](../codeunit/5856.md) (1 call: `RunWithCheck → GetNothingToPostErrorMsg`)
- [Codeunit 5884 "Phys. Invt. Order-Post"](../codeunit/5884.md) (1 call: `Code → GetNothingToPostErrorMsg`)
- [Codeunit 5957 "Serv. Posting Selection Mgt."](../codeunit/5957.md) (1 call: `ConfirmPostServiceDocument → GetNothingToPostErrorMsg`)
- [Codeunit 5980 "Service-Post"](../codeunit/5980.md) (1 call: `CheckAndSetPostingConstants → GetNothingToPostErrorMsg`)
- [Codeunit 5981 "Service-Post (Yes/No)"](../codeunit/5981.md) (1 call: `Code → GetNothingToPostErrorMsg`)
- [Codeunit 7324 "Whse.-Activity-Post"](../codeunit/7324.md) (1 call: `Code → GetNothingToPostErrorMsg`)
- [Codeunit 79 "Sales-Post and Send"](../codeunit/79.md) (1 call: `OnRun → GetNothingToPostErrorMsg`)
- [Codeunit 80 "Sales-Post"](../codeunit/80.md) (1 call: `CheckHeaderPostingType → GetNothingToPostErrorMsg`)
- [Codeunit 81 "Sales-Post (Yes/No)"](../codeunit/81.md) (1 call: `OnRun → GetNothingToPostErrorMsg`)
- [Codeunit 90 "Purch.-Post"](../codeunit/90.md) (1 call: `CheckHeaderPostingType → GetNothingToPostErrorMsg`)
- [Codeunit 900 "Assembly-Post"](../codeunit/900.md) (1 call: `InitPost → GetNothingToPostErrorMsg`)
- [Codeunit 91 "Purch.-Post (Yes/No)"](../codeunit/91.md) (1 call: `OnRun → GetNothingToPostErrorMsg`)
- [Codeunit 980 "Payment Registration Mgt."](../codeunit/980.md) (1 call: `CheckPaymentsToPost → GetNothingToPostErrorMsg`)
- [Page 46 "Sales Order Subform"](../page/46.md) (1 call: `SetOpenPage → BackgroundValidationEnabled`)
- [Page 47 "Sales Invoice Subform"](../page/47.md) (1 call: `SetOpenPage → BackgroundValidationEnabled`)
- [Page 54 "Purchase Order Subform"](../page/54.md) (1 call: `SetOpenPage → BackgroundValidationEnabled`)
- [Page 55 "Purch. Invoice Subform"](../page/55.md) (1 call: `SetOpenPage → BackgroundValidationEnabled`)
- [Page 5934 "Service Invoice Subform"](../page/5934.md) (1 call: `OnOpenPage → BackgroundValidationEnabled`)
- [Page 5936 "Service Credit Memo Subform"](../page/5936.md) (1 call: `OnOpenPage → BackgroundValidationEnabled`)
- [Page 6631 "Sales Return Order Subform"](../page/6631.md) (1 call: `OnOpenPage → BackgroundValidationEnabled`)
- [Page 6641 "Purchase Return Order Subform"](../page/6641.md) (1 call: `OnOpenPage → BackgroundValidationEnabled`)
- [Page 96 "Sales Cr. Memo Subform"](../page/96.md) (1 call: `SetOpenPage → BackgroundValidationEnabled`)
- [Page 98 "Purch. Cr. Memo Subform"](../page/98.md) (1 call: `SetOpenPage → BackgroundValidationEnabled`)
- [Table 37 "Sales Line"](../table/37.md) (1 call: `SwitchLinesWithErrorsFilter → GetErrorMessages`)
- [Table 39 "Purchase Line"](../table/39.md) (1 call: `SwitchLinesWithErrorsFilter → GetErrorMessages`)
- [Table 5902 "Service Line"](../table/5902.md) (1 call: `SwitchLinesWithErrorsFilter → GetErrorMessages`)

## Recent changes

- 2026-07-07 [#9086 Bug 641085: Document Check factbox does not update live on Purchase Invoice/Cr.Memo/Return Order](../../changes/bcapps/9086.md) (main, BC30, fix)

## Across versions

- Present in: BC23-30
- Changed (declaration) in: BC25

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: "Document Errors Mgt.")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.
