
Hello,
I have added a new field in Gen. Journal Line. I am posting invoice using purchase journal and I have added one new field. I want when I post the invoice through purchase journal the new field value should move to vendor ledger entry also created the same field in the vendor ledger entry.
Subscribe the following event and add your code this will work
[EventSubscriber(ObjectType::Table, Database::"Vendor Ledger Entry", 'OnAfterCopyVendLedgerEntryFromGenJnlLine', '', true, true)]
local procedure new(var VendorLedgerEntry: Record "Vendor Ledger Entry"; GenJournalLine: Record "Gen. Journal Line")
begin
VendorLedgerEntry."Faktura-Boks Document Code" := GenJournalLine."Faktura-Boks Document Code";
END;