Codeunit 2679 "Purchase Alloc. Acc. Mgt."
Base Application · Microsoft.Finance.AllocationAccount.Purchase
Across versions
- BC23present
- BC243 procedures added, 2 procedures changed
- BC253 procedures added
- BC26unchanged
- BC271 events added
- BC281 procedures added
- BC292 procedures added, 1 procedures removed
- BC30unchanged
Neighbourhood 7 connected objects and pages
Base Application · Microsoft.Finance.AllocationAccount.Purchase · BC23-30 · source at 4e6a307c · facts from BC29
Events published
OnBeforeCreatePurchaseLine(var PurchaseLine: Record "Purchase Line"; var AllocationLine: Record "Allocation Line"; var AllocationPurchaseLine: Record "Purchase Line")(integration): Integration event raised before creating purchase line from allocation line during distribution process. Enables custom modification of purchase line fields before standard allocation line processing.OnBeforeVerifyPurchaseLine(var PurchaseLine: Record "Purchase Line")(integration): Integration event raised before verifying purchase line during allocation account validation. Enables custom validation logic for purchase lines before standard allocation verification.OnLoadManualAllocationLinesOnBeforeInsertAllocationLine(var AllocAccManualOverride: Record "Alloc. Acc. Manual Override"; var AllocationLine: Record "Allocation Line")+ BC27 (integration)
Event subscriptions
- HandlePostDocument subscribes to Codeunit “Purch.-Post” OnBeforePostPurchaseDoc
- HandleShowDimensions subscribes to Table “Purchase Line” OnBeforeShowDimensions
- HandleAfterCheckSalesApprovalPossible subscribes to Codeunit “Approvals Mgmt.” OnAfterCheckPurchaseApprovalPossible
- CheckBeforeModifyLine subscribes to Table “Purchase Line” OnBeforeModifyEvent
- HandleValidateLineNo subscribes to Table “Purchase Line” OnBeforeValidateNo
Procedures
GetOrGenerateAllocationLines(var AllocationLine: Record "Allocation Line"; var ParentSystemId: Guid)(internal)GetOrGenerateAllocationLines(var AllocationLine: Record "Allocation Line"; var ParentSystemId: Guid; var AmountToAllocate: Decimal; var PostingDate: Date)(internal)LoadManualAllocationLines(var PurchaseLine: Record "Purchase Line"; var AllocationLine: Record "Allocation Line")(internal)CreateLinesFromAllocationAccountLine(var AllocationAccountPurchaseLine: Record "Purchase Line")+ BC29: Creates individual purchase lines from allocation account distribution lines based on allocation percentages or amounts. Processes allocation account configuration and generates corresponding G/L account lines with calculated amounts.VerifyAllocationAccount(var AllocationAccount: Record "Allocation Account")(internal)TransferDimensionSetID(var PurchaseLine: Record "Purchase Line"; var AllocationLine: Record "Allocation Line"; ModifiedByUser: Boolean)Δ BC24: Transfers dimension set ID from allocation line to purchase line with merge capabilities. Combines dimensions when both records have existing dimension sets or overwrites when specified.VerifySelectedAllocationAccountNo(var PurchaseLine: Record "Purchase Line")Δ BC24: Validates the selected allocation account number on purchase line and verifies compatibility. Ensures the allocation account is properly configured and the purchase line uses G/L account type.
Plus 24 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 2675 “Allocation Account Mgt.” (4 calls:
GetAmount → GetCurrencyRoundingPrecision,GetUnitPrice → GetCurrencyRoundingPrecision,MoveAmounts → GetCurrencyRoundingPrecision, …) - Codeunit 2674 “Alloc. Acc. Handle Doc. Post” (3 calls:
CreatePurchaseLine → SetPurchaseAllocationSourceLineFilter,CreatePurchaseLine → SetVATBusPostingGroupCode,CreatePurchaseLine → SetVATProdPostingGroupCode) - Codeunit 415 “Release Purchase Document” (3 calls:
CheckPurchaseReleaseStatus → (object),CheckPurchaseReleaseStatus → Reopen,CheckPurchaseReleaseStatus → SetSkipCheckReleaseRestrictions) - Codeunit 408 “DimensionManagement” (2 calls:
TransferDimensionSetID → GetCombinedDimensionSetID,TransferDimensionSetID → UpdateGlobalDimFromDimSetID) - Codeunit 1720 “Deferral Utilities” (1 call:
CopyDeferralSchedule → CreateCopyOfDeferralSchedule) - Codeunit 2676 “Alloc. Acc. Telemetry” (1 call:
HandlePostDocument → LogPurchaseInvoicePostingUsage)
Called by
- Table 2672 “Allocation Line” (1 call:
GetOrGenerateAllocationLines → GetOrGenerateAllocationLines)
Recent changes
- 2026-12-03 #14774 [29x]Track failed BCApps validation (releases/29.x, BC29, fix)
- 2026-11-27 [#14579 [29.x]Genrate Lines from Allocation Account Line leaves incorrect Non-deductible VAT amounts when Prices Including VAT is enabled. (releases/29.x, BC29, fix)
- 2026-11-26 #14481 [Main] Generate Lines from Allocation Account Line leaves incorrect Non-deductible VAT amounts when Prices Including VAT is enabled. (main, BC30, fix)
- 2026-11-18 #13787 [Main]error in allocation account function (main, BC30, fix)
Possibly related
No source states these links: they share an object, a model read them, or a person found the same subject.
- Set up validation of purchase amounts — possibly related: Purchase allocation account management relates to purchase document amount validation (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: "Purchase Alloc. Acc. Mgt."), then bcatlas_get_procedure_body or bcatlas_get_neighbors on the returned id.