tableextension 50119 MyExtension extends "Gen. Journal Line"
{
fields
{
field(50100; ZYTest; Text[100])
{
Caption = 'ZY Test';
DataClassification = CustomerContent;
}
}
}
pageextension 50121 CustomerLedgerEntriesExt extends "Customer Ledger Entries"
{
layout
{
addafter("Document No.")
{
field(ZYTest; Rec.ZYTest)
{
ApplicationArea = All;
}
}
}
}
tableextension 50121 CustLedgerEntryExt extends "Cust. Ledger Entry"
{
fields
{
field(50100; ZYTest; Text[100])
{
Caption = 'ZY Test';
DataClassification = CustomerContent;
}
}
}
codeunit 50116 CcBccHandle
{
[EventSubscriber(ObjectType::Codeunit, Codeunit::"Gen. Jnl.-Post Line", OnAfterInitCustLedgEntry, '', false, false)]
local procedure OnAfterInitCustLedgEntry(var CustLedgerEntry: Record "Cust. Ledger Entry"; GenJournalLine: Record "Gen. Journal Line"; var GLRegister: Record "G/L Register");
begin
CustLedgerEntry.ZYTest := GenJournalLine.ZYTest;
end;
}
Hi
You have to subscribe to this event.
And here pass the values from General Journal Line to Customer Ledger Entry.
Best Regards
Gerardo
André Arnaud de Cal... 291,642 Super User 2024 Season 2
Martin Dráb 230,371 Most Valuable Professional
nmaenpaa 101,156