Codeunit 6284 Sust. FA Post Subscriber
Source AL, 96 lines
src/Apps/W1/Sustainability/app/src/Posting/SustFAPostSubscriber.Codeunit.allines 14 to 29 of 96, Copyright (c) Microsoft Corporation. MIT
codeunit 6284 "Sust. FA Post Subscriber"{ [EventSubscriber(ObjectType::Codeunit, Codeunit::"FA Jnl.-Post Line", 'OnAfterPostFixedAsset', '', false, false)] local procedure OnAfterPostFixedAsset(FALedgEntry: Record "FA Ledger Entry") begin if CanCreateSustValueEntry(FALedgEntry) then PostSustainabilityValueEntry(FALedgEntry); end; local procedure CanCreateSustValueEntry(FALedgerEntry: Record "FA Ledger Entry"): Boolean begin if not SustainabilitySetup.IsValueChainTrackingEnabled() then exit(false); exit((FALedgerEntry."Sust. Account No." <> '') and (FALedgerEntry.IsSourcePurchase() or (FALedgerEntry.IsSourceSales()))); end;Procedures 1
| Procedure | Versions |
|---|---|
| internal Check | new in 28 |