Codeunit 6228 Sust. Preview Posting Handler

Sustainability, Microsoft.Sustainability.Posting

Source AL, 46 lines

src/Apps/W1/Sustainability/app/src/Posting/SustPreviewPostingHandler.Codeunit.allines 5 to 20 of 46, Copyright (c) Microsoft Corporation. MIT

codeunit 6228 "Sust. Preview Posting Handler"{    EventSubscriberInstance = Manual;    SingleInstance = true;    [EventSubscriber(ObjectType::Codeunit, Codeunit::"Sustainability Post Mgt", 'OnInsertLedgerEntryOnBeforeInsert', '', false, false)]    local procedure OnInsertLedgerEntryOnBeforeInsert(var SustainabilityLedgerEntry: Record "Sustainability Ledger Entry"; var IsHandled: Boolean)    var        SustPreviewPostInstance: Codeunit "Sust. Preview Post Instance";    begin        if IsHandled then            exit;        SustPreviewPostInstance.InsertSustLedgEntry(SustainabilityLedgerEntry, true);        IsHandled := true;    end;

All 46 lines

Public procedures 2 in 29

TryBindPostingPreviewHandler(): Booleannew in 25
TryUnbindPostingPreviewHandler(): Booleannew in 25