Codeunit 5914 Invt. Ledger Service Source
Source AL, 28 lines
src/Layers/W1/BaseApp/Service/History/InvtLedgerServiceSource.Codeunit.allines 9 to 24 of 28, Copyright (c) Microsoft Corporation. MIT
codeunit 5914 "Invt. Ledger Service Source"{ [EventSubscriber(ObjectType::Codeunit, Codeunit::"Invt. Ledger Source Mgt.", OnGetSourceOrderNo, '', true, false)] local procedure OnGetSourceOrderNo(DocType: Enum "Item Ledger Document Type"; DocNo: Code[20]; var SourceOrderNo: Code[20]) var ServiceInvoiceHdr: Record "Service Invoice Header"; begin if DocNo = '' then exit; case DocType of DocType::"Service Invoice": begin ServiceInvoiceHdr.SetLoadFields("Order No."); if ServiceInvoiceHdr.Get(DocNo) then SourceOrderNo := ServiceInvoiceHdr."Order No.";