Hi Can anyone help me with your suggestion the following codeunit Extension is correct.
It suggest to flow values into custom fields
-------
If it is invoicing buffer then
[EventSubscriber(ObjectType::Codeunit, Codeunit::"Sales-Post", 'OnBeforePostCustomerEntry', '', false, false)]
local procedure OnBeforePostCustomerEntry(var GenJnlLine: Record "Gen. Journal Line"; var SalesHeader: Record "Sales Header"; var TotalSalesLine: Record "Sales Line"; var TotalSalesLineLCY: Record "Sales Line"; CommitIsSuppressed: Boolean; PreviewMode: Boolean; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line");
begin
GenJnlLine."Send to CLE from SH" := SalesHeader."Send to CLE from SH";
end;
[EventSubscriber(ObjectType::Codeunit, Codeunit::"Gen. Jnl.-Post Line", 'OnPostCustOnAfterInitCustLedgEntry', '', false, false)]
local procedure OnPostCustOnAfterInitCustLedgEntry(var Sender: Codeunit "Gen. Jnl.-Post Line"; var GenJournalLine: Record "Gen. Journal Line"; var CustLedgEntry: Record "Cust. Ledger Entry"; Cust: Record Customer; CustPostingGr: Record "Customer Posting Group");
begin
CustLedgEntry."Send to CLE from SH" := GenJournalLine."Send to CLE from SH";
end;
Mohana,
I am not savvy and talented to understand and code immediately.I know basic AL syntax. That is why I am coming here.
either invoice posting or Invoicing buffer, how to add a few lines mentioned in my code.
Which option is selected in Sales & receivables setup? answer depends on the option that you are using.
thanks
it shows the features.
I request my specific question.
please.
Admin warned me for long threading on my discussion. please..
I don't know about this. Just I have a few new custom fields Chequeno, Cheque date, and Consumer id. These should go to GL, CLE
I have created in My extension as an object VSC
Are you using the new extensible posting engine in the latest BC version?
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,219 Super User 2024 Season 2
Martin Dráb 230,056 Most Valuable Professional
nmaenpaa 101,156