Codeunit 6989 "Expense Attachment Mgt."
ExpenseAgent · Microsoft.ExpenseAgent
Across versions
- BC23-28not present
- BC29-30present
Neighbourhood 6 connected objects and pages
ExpenseAgent · Microsoft.ExpenseAgent · BC29-30 · source at 4e6a307c · facts from BC29
Properties
| Property | Value |
|---|---|
| Access | Internal |
Event subscriptions
- OnAfterInsertEvent subscribes to Table “Document Attachment” OnAfterInsertEvent
- OnBeforeImportFromStream subscribes to Table “Document Attachment” OnBeforeImportFromStream
- OnBeforeDeleteAttachment subscribes to Table “Document Attachment” OnBeforeDeleteEvent
- OnAfterModifyEvent subscribes to Table “Document Attachment” OnAfterModifyEvent
- OnAfterDeleteEvent subscribes to Table “Document Attachment” OnAfterDeleteEvent
- OnBeforeOpenInOneDrive subscribes to Table “Document Attachment” OnBeforeOpenInOneDrive
- DeleteAttachedDocumentsOnAfterDeleteExpense subscribes to Table “Expense” OnAfterDeleteEvent
- DeleteAttachedDocumentsOnAfterDeleteExpenseReportLine subscribes to Table “Expense Report Line” OnAfterDeleteEvent
- OnAfterGetRefTable subscribes to Codeunit “Document Attachment Mgmt” OnAfterGetRefTable
- OnAfterInitFieldsFromRecRef subscribes to Table “Document Attachment” OnAfterInitFieldsFromRecRef
- OnAfterSetDocumentAttachmentFiltersForRecRefInternal subscribes to Codeunit “Document Attachment Mgmt” OnAfterSetDocumentAttachmentFiltersForRecRefInternal
- OnAfterTableHasNumberFieldPrimaryKey subscribes to Codeunit “Document Attachment Mgmt” OnAfterTableHasNumberFieldPrimaryKey
- OnAfterTableHasLineNumberPrimaryKey subscribes to Codeunit “Document Attachment Mgmt” OnAfterTableHasLineNumberPrimaryKey
- OnCopyAttachmentsOnAfterSetFromParameters subscribes to Codeunit “Document Attachment Mgmt” OnCopyAttachmentsOnAfterSetFromParameters
- OnCopyAttachmentsOnAfterSetToParameters subscribes to Codeunit “Document Attachment Mgmt” OnCopyAttachmentsOnAfterSetToParameters
- OnCopyAttachmentsOnAfterSetToDocumentFilters subscribes to Codeunit “Document Attachment Mgmt” OnCopyAttachmentsOnAfterSetToDocumentFilters
Procedures
RestrictAttachment(DocumentAttachment: Record "Document Attachment")(internal)HasPDFAttachment(TableID: Integer; DocumentNo: Code[20]; LineNo: Integer): Boolean(internal)
Plus 11 local procedures.
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 1173 “Document Attachment Mgmt” (2 calls:
DeleteAttachedDocumentsOnAfterDeleteExpense → DeleteAttachedDocuments,DeleteAttachedDocumentsOnAfterDeleteExpenseReportLine → DeleteAttachedDocuments) - Codeunit 4100 “Temp Blob” (2 calls:
UpdateContentHash → CreateInStream,UpdateContentHash → HasValue) - Codeunit 6902 “Expense Rule Validation” (2 calls:
CheckAndUpdateAttachmentOnExpense → ValidateExpenseAgainstRule,CheckAndUpdateAttachmentOnExpenseReportLine → ValidateExpenseReportLineAgainstRule) - Codeunit 1266 “Cryptography Management” (1 call:
UpdateContentHash → GenerateHash)
Called by
- Codeunit 6952 “Exp. Attach. Buffer Handler” (1 call:
PropagateModifyAttachment → RestrictAttachment) - Page 6988 “Expense” (1 call:
OnAfterGetCurrRecord → HasPDFAttachment)
Recent changes
- 2026-11-29 #14598 [Expense Agent] Corporate card transactions as expense report lines (main, BC30, feature)
- 2026-11-26 #14528 Deliverable 660629: [29.x] BCApps part of No Receipt expenses (releases/29.x, BC29, feature)
- 2026-11-20 #12544 Slice 626931: [Expense Agent] Lost receipt workflow and document creation (November ’26) (main, BC30, feature)
- 2026-10-13 #12554 [Main] - User encounters a “record is not open” error when attaching a document to a posted sales shipment in Dynamics 365 (Base Application v28) (main, BC30, fix)
- 2026-09-15 #10828 Avoid remote attachment checks during FactBox refresh (main, BC30, performance)
- 2026-08-04 #9859 [Master] - Move Expense Agent (Preview) app into BCApps (main, BC30, feature, added)
Possibly related
No source states these links: they share an object, a model read them, or a person found the same subject.
- Expense Agent Overview for Business Central — possibly related: Manages expense attachments; Expense Agent overview covers attachment handling in expense processing. (model-linked)
- Expense Agent Overview in Business Central — possibly related: Handles attachments for expense management; covers receipt and document processing in Expense Agent. (model-linked)
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: "Expense Attachment Mgt."), then bcatlas_get_procedure_body or bcatlas_get_neighbors on the returned id.