Codeunit 28 "Error Message Management"
Base Application · System.Utilities
Across versions
- BC23present
- BC243 procedures added
- BC254 procedures removed, 1 procedures added
- BC261 procedures removed
- BC271 procedures changed
- BC28-30unchanged
Neighbourhood 73 connected objects and pages
Base Application · System.Utilities · BC23-30 · source at ea08af5e · facts from BC29
Events published
OnFindActiveSubscriber(var IsFound: Boolean)(integration)- subscribers: Codeunit 29 “Error Message Handler” OnFindActiveSubscriberHandler
OnGetFirstContextID(ContextRecordID: RecordID; var ContextID: Integer)(integration)- subscribers: Codeunit 29 “Error Message Handler” OnGetFirstContextIDHandler
OnGetErrors(var TempErrorMessageResult: Record "Error Message" temporary)(integration)- subscribers: Codeunit 29 “Error Message Handler” OnGetErrorsHandler
OnGetLastErrorID(var ID: Integer; var ErrorMessage: Text[250])(integration)- subscribers: Codeunit 29 “Error Message Handler” OnGetLastErrorID
OnGetCachedLastErrorID(var ID: Integer)(integration)- subscribers: Codeunit 29 “Error Message Handler” OnGetCachedLastErrorID
OnGetLastErrorMessageRecord(var ErrorMessage: Record "Error Message" temporary)(internal)- subscribers: Codeunit 29 “Error Message Handler” OnGetLastErrorMessageRecord
OnLogSimpleError(ErrorMessage: Text; var IsLogged: Boolean)(integration)- subscribers: Codeunit 29 “Error Message Handler” OnLogSimpleErrorHandler
OnLogError(MessageType: Option; ContextFieldNo: Integer; ErrorMessage: Text; SourceVariant: Variant; SourceFieldNo: Integer; HelpArticleCode: Code[30]; var IsLogged: Boolean)(integration)- subscribers: Codeunit 29 “Error Message Handler” OnLogErrorHandler
OnPushContext()(integration)- subscribers: Codeunit 29 “Error Message Handler” OnPushContextHandler
OnGetTopElement(var TopElementID: Integer)(integration)- subscribers: Codeunit 30 “Error Context Element” OnGetTopElementHandler
OnGetTopElementData(var TopElementID: Integer; var ContextRecID: RecordID; var ContextFldNo: Integer; var AdditionalInfo: Text[250])(integration)- subscribers: Codeunit 30 “Error Context Element” OnGetTopElementDataHandler
OnGetTopContext(var ErrorMessage: Record "Error Message")(integration)- subscribers: Codeunit 30 “Error Context Element” OnGetTopContextHandler
OnLogLastError()(integration)- subscribers: Codeunit 29 “Error Message Handler” OnLogLastErrorHandler
OnBeforeGetContextRecID(ContextVariant: Variant; var ContextRecID: RecordID; var IsHandled: Boolean)(integration)OnAddToJsonFromErrorMessage(var JObject: JsonObject; var ErrorMessage: Record "Error Message" temporary)(integration)- subscribers: Codeunit 7905 “ErrorMessagesActionHandlerImpl” OnAddToJsonFromErrorMessageHandler
OnAddToErrorMessageFromJson(var ErrorMessage: Record "Error Message" temporary; var JObject: JsonObject)(integration)- subscribers: Codeunit 7905 “ErrorMessagesActionHandlerImpl” OnAddToErrorMessageFromJsonHandler
OnAddSubContextToLastErrorMessage(Tag: Text; VariantRec: Variant; var ErrorMessage: Record "Error Message" temporary)(integration)- subscribers: Codeunit 7903 “Dimension Code Same Error” OnAddSubContextToLastErrorMessage, Codeunit 7904 “Dimension Code Must Be Blank” OnAddSubContextToLastErrorMessage, Codeunit 7906 “Dim. Code Same But Missing Err” OnAddSubContextToLastErrorMessage
Procedures
Activate(var ErrorMessageHandler: Codeunit "Error Message Handler"): BooleanΔ BC27Activate(var ErrorMessageHandler: Codeunit "Error Message Handler"; ClearError: Boolean): BooleanΔ BC27IsActive(): BooleanFinish(ContextVariant: Variant)FinishTopContext()IsTransactionStopped(): BooleanGetCurrCallStack(): TextShowErrors(Notification: Notification)ShowErrors(RegisterID: Guid)ThrowError(ContextErrorMessage: Text; DetailedErrorMessage: Text)− BC26GetFieldNo(TableNo: Integer; FieldName: Text): IntegerFindFirstErrorMessage(var ErrorMessage: Text[250]): BooleanGetErrors(var TempErrorMessage: Record "Error Message" temporary): BooleanGetErrorsInContext(ContextVariant: Variant; var TempErrorMessage: Record "Error Message" temporary): BooleanGetLastError(var ErrorMessage: Text[250]): IntegerGetLastErrorID(): IntegerGetCachedLastErrorID(): IntegerLogError(SourceVariant: Variant; ErrorMessage: Text; HelpArticleCode: Code[30])LogContextFieldError(ContextFieldNo: Integer; ErrorMessage: Text; SourceVariant: Variant; SourceFieldNo: Integer; HelpArticleCode: Code[30])LogMessage(NewMessageType: Option; ContextFieldNo: Integer; InformationMessage: Text; SourceVariant: Variant; SourceFieldNo: Integer; HelpArticleCode: Code[30]): BooleanLogErrorMessage(ContextFieldNo: Integer; ErrorMessage: Text; SourceVariant: Variant; SourceFieldNo: Integer; HelpArticleCode: Code[30]): BooleanLogSimpleErrorMessage(ErrorMessage: Text): BooleanLogTestField(SourceVariant: Variant; SourceFieldNo: Integer): BooleanLogTestField(SourceVariant: Variant; SourceFieldNo: Integer; ExpectedValue: Variant): BooleanLogFieldError(SourceVariant: Variant; SourceFieldNo: Integer; ErrorMessage: Text): BooleanInsertTempLineErrorMessage(var TempLineErrorMessage: Record "Error Message" temporary; RecordId: RecordId; TableNo: Integer; FieldNo: Integer; Description: Text; CallStack: Text)+ BC24CollectErrors(var TempLineErrorMessage: Record "Error Message" temporary)LogLastError()FldRefHasValue(FldRef: FieldRef): BooleanGetErrorsFromResultValues(Values: List of [Text]; var TempErrorMessage: Record "Error Message" temporary)AddSubContextToLastErrorMessage(Tag: Text; VariantRec: Variant)ParseErrorText(JSON: Text; var TempErrorMessage: Record "Error Message" temporary)ErrorMessage2JSON(var ErrorMessage: Record "Error Message"): TextPackErrorMessagesToResults(var TempErrorMessage: Record "Error Message" temporary; var Results: Dictionary of [Text, Text])LogWarning(ContextFieldNo: Integer; WarningMessage: Text; SourceVariant: Variant; SourceFieldNo: Integer; HelpArticleCode: Code[30]): BooleanLogWarning(WarningMessage: Text): BooleanLogInformation(ContextFieldNo: Integer; InformationMessage: Text; SourceVariant: Variant; SourceFieldNo: Integer; HelpArticleCode: Code[30]): BooleanLogInformation(InformationMessage: Text): BooleanPopContext(var ErrorContextElement: Codeunit "Error Context Element"): IntegerPushContext(var ErrorContextElement: Codeunit "Error Context Element"; ContextVariant: Variant; ContextFieldNo: Integer; AdditionalInfo: Text[250]): IntegerGetLastContext(var ErrorMessage: Record "Error Message"): BooleanBuildActionableErrorInfo(ErrorTitle: Text; ErrorMessage: Text; RecId: RecordId; ActionMessage: Text; ActionCodeunuitId: Integer; ActionName: Text): ErrorInfo+ BC24 + BC24 + BC25BuildActionableErrorInfo(ErrorTitle: Text; ErrorMessage: Text; RecId: RecordId; ActionMessage: Text; ActionCodeunuitId: Integer; ActionName: Text; ActionDescription: Text): ErrorInfo+ BC24 + BC24 + BC25BuildActionableErrorInfo(ErrorTitle: Text; ErrorMessage: Text; SysId: Guid; ActionMessage: Text; ActionCodeunuitId: Integer; ActionName: Text; ActionDescription: Text): ErrorInfo+ BC24 + BC24 + BC25GetTopContext(var ErrorMessage: Record "Error Message"): Boolean
Plus 13 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 31 “Last Error Context Element” (3 calls:
GetLastContext → GetErrorMessage,PopContext → Set,PushContext → Set) - Codeunit 30 “Error Context Element” (2 calls:
PushContext → GetID,PushContext → Set)
Called by
- Codeunit 481 “Check Dimensions” (24 calls:
CheckPurchDimCombHeader → PopContext,CheckPurchDimCombHeader → PushContext,CheckPurchDimCombHeader → ThrowError, …) - Codeunit 80 “Sales-Post” (12 calls:
CheckBlockedPostingGroups → LogContextFieldError,CheckSalesDocument → Finish,CheckSalesDocument → GetFieldNo, …) - Codeunit 90 “Purch.-Post” (12 calls:
CheckBlockedPostingGroups → LogContextFieldError,CheckPostingDate → GetFieldNo,CheckPostingDate → LogContextFieldError, …) - Codeunit 442 “Sales-Post Prepayments” (11 calls:
BuildInvLineBuffer → FinishTopContext,CheckPrepmtDoc → Finish,CheckPrepmtDoc → GetFieldNo, …) - Codeunit 444 “Purchase-Post Prepayments” (11 calls:
BuildInvLineBuffer → FinishTopContext,CheckPrepmtDoc → Finish,CheckPrepmtDoc → GetFieldNo, …) - Codeunit 408 “DimensionManagement” (9 calls:
FindLastErrorMessage → GetLastError,FindLastErrorMessage → IsActive,GetLastDimErrorID → GetCachedLastErrorID, …) - Codeunit 9068 “Check Purch. Doc. Backgr.” (9 calls:
OnRun → PackErrorMessagesToResults,RunPurchaseDocCheckCodeunit → Activate,RunPurchaseDocCheckCodeunit → CollectErrors, …) - Codeunit 9072 “Check Sales Doc. Backgr.” (9 calls:
OnRun → PackErrorMessagesToResults,RunSalesDocCheckCodeunit → Activate,RunSalesDocCheckCodeunit → CollectErrors, …) - Codeunit 13 “Gen. Jnl.-Post Batch” (7 calls:
CheckLine → PopContext,CheckLine → PushContext,CheckShortcutDimConsistency → Finish, …) - Codeunit 1380 “Batch Processing Mgt.” (6 calls:
BatchProcessGenJournalLine → Activate,CanProcessRecord → LogError,GetErrorMessages → GetErrors, …) - Codeunit 1509 “Notification Entry Dispatcher” (6 calls:
AddNote → LogError,CreateMailAndDispatch → LogError,DispatchInstantNotifications → Activate, …) - Codeunit 6620 “Copy Document Mgt.” (6 calls:
CopySalesDoc → Activate,CopySalesDoc → PopContext,CopySalesDoc → PushContext, …) - Codeunit 9079 “Background Error Handling Mgt.” (5 calls:
GetErrorsFromDocumentCheckResultValues → GetErrorsFromResultValues,GetErrorsFromGenJnlCheckResultValues → GetErrorsFromResultValues,GetErrorsFromItemJnlCheckResultValues → GetErrorsFromResultValues, …) - Codeunit 9084 “Check Service Doc. Backgr.” (5 calls:
OnRun → PackErrorMessagesToResults,RunServiceDocCheckCodeunit → Activate,RunServiceDocCheckCodeunit → CollectErrors, …) - Codeunit 1371 “Sales Batch Post Mgt.” (4 calls:
PrepareBatch → LogError,RunWithUI → Activate,RunWithUI → GetLastErrorID, …) - Codeunit 1372 “Purchase Batch Post Mgt.” (4 calls:
PrepareBatch → LogError,RunWithUI → Activate,RunWithUI → GetLastErrorID, …) - Codeunit 5286 “Data Check Mgt. SAF-T” (4 calls:
LogError → LogContextFieldError,OnRun → Activate,OnRun → PushContext, …) - Codeunit 8800 “Custom Layout Reporting” (4 calls:
LogErrorEmailSendTo → LogError,LogSimpleError → LogSimpleErrorMessage,ProcessReport → Activate, …) - Codeunit 8811 “Customer Statement via Queue” (4 calls:
OnRun → Activate,OnRun → LogErrorMessage,OnRun → PopContext, …) - Codeunit 11 “Gen. Jnl.-Check Line” (3 calls:
RunCheck → Activate,RunCheck → GetErrors,RunCheck → PushContext) - Codeunit 19 “Gen. Jnl.-Post Preview” (3 calls:
OnRun → LogError,PreviewStart → Activate,PreviewStart → PushContext) - Codeunit 373 “Bank. Acc. Recon. Post Preview” (3 calls:
PreviewStart → Activate,PreviewStart → PushContext,RunPreview → LogError) - Codeunit 393 “Reminder-Issue” (3 calls:
OnRun → Activate,OnRun → PopContext,OnRun → PushContext) - Codeunit 449 “Job Queue Start Codeunit” (3 calls:
OnRun → GetErrorsInContext,OnRun → PopContext,OnRun → PushContext) - Codeunit 450 “Job Queue Error Handler” (3 calls:
LogError → Activate,LogError → PopContext,LogError → PushContext) - Codeunit 5988 “Serv-Documents Mgt.” (3 calls:
PostDocumentLines → Finish,PostDocumentLines → PopContext,PostDocumentLines → PushContext) - Codeunit 7092 “Expense Report Batch Post Mgt.” (3 calls:
RunWithUI → Activate,RunWithUI → GetLastErrorID,RunWithUI → PushContext) - Report 5707 “Batch Post Transfer Orders” (3 calls:
RunPostBatchTransferOrder → Activate,RunPostBatchTransferOrder → LogErrorMessage,RunPostBatchTransferOrder → PushContext) - Codeunit 1000 “Job Calculate WIP” (2 calls:
ActivateErrorMessageHandling → Activate,ActivateErrorMessageHandling → PushContext) - Codeunit 20415 “Qlty. Tracking Integration” (2 calls:
LogBlockedTransactionError → IsActive,LogBlockedTransactionError → LogContextFieldError) - Codeunit 443 “Sales-Post Prepayment (Yes/No)” (2 calls:
PostPrepmtDocument → Activate,PostPrepmtDocument → PushContext) - Codeunit 445 “Purch.-Post Prepmt. (Yes/No)” (2 calls:
PostPrepmtDocument → Activate,PostPrepmtDocument → PushContext) - Codeunit 5261 “Audit File Export Mgt.” (2 calls:
PreExportCheck → Activate,PreExportCheck → GetLastErrorID) - Codeunit 5285 “Audit Data Check SAF-T” (2 calls:
CheckAuditDocReadyToExport → GetLastErrorID,CheckAuditDocReadyToExport → LogErrorMessage) - Codeunit 6216 “Sustainability Jnl.-Check” (2 calls:
CheckSustainabilityJournalLineWithErrorCollect → CollectErrors,CheckSustainabilityJournalLineWithErrorCollect → InsertTempLineErrorMessage) - Codeunit 6273 “Sust. Excise Jnl.-Check” (2 calls:
CheckSustainabilityExciseJournalLineWithErrorCollect → CollectErrors,CheckSustainabilityExciseJournalLineWithErrorCollect → InsertTempLineErrorMessage) - Codeunit 85 “Sales Post Batch via Job Queue” (2 calls:
PostSalesBatch → LogLastError,PrintDocument → LogLastError) - Codeunit 9081 “Check Gen. Jnl. Line. Backgr.” (2 calls:
PackErrorMessagesToResults → ErrorMessage2JSON,RunGenJnlCheckLineCodeunit → CollectErrors) - Codeunit 95 “Purch Post Batch via Job Queue” (2 calls:
PostPurchaseBatch → LogLastError,PrintDocument → LogLastError) - Table 36 “Sales Header” (2 calls:
SendToPosting → Activate,SendToPosting → PushContext) - Table 37 “Sales Line” (2 calls:
CannotInvoiceErrorInfo → BuildActionableErrorInfo,CannotShipErrorInfo → BuildActionableErrorInfo) - Table 38 “Purchase Header” (2 calls:
SendToPosting → Activate,SendToPosting → PushContext) - Table 39 “Purchase Line” (2 calls:
CannotInvoiceErrorInfo → BuildActionableErrorInfo,CannotReceiveErrorInfo → BuildActionableErrorInfo) - Table 5740 “Transfer Header” (2 calls:
CheckTransferLines → PopContext,CheckTransferLines → PushContext) - Table 5900 “Service Header” (2 calls:
SendToPostWithLines → Activate,SendToPostWithLines → PushContext) - Table 700 “Error Message” (2 calls:
AssertRecordTemporaryOrInContext → GetTopContext,GetContext → GetTopContext) - Codeunit 2580 “Dimension Correction Mgt” (1 call:
ValidateDimensionSets → GetLastError) - Codeunit 48 “PostingSetupManagement” (1 call:
LogContextFieldError → LogContextFieldError) - Codeunit 5260 “Audit Mapping Helper” (1 call:
LogError → LogError) - Codeunit 5580 “Voucher Attachment Check” (1 call:
CheckVoucherIsAttachedToDocument → LogSimpleErrorMessage) - and 15 more: data/code/graph/29/calls.json
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: "Error Message Management"), then bcatlas_get_procedure_body or bcatlas_get_neighbors on the returned id.