microsoft / ALAppExtensions

Repository for collaboration on Microsoft AL application add-on and localization extensions for Microsoft Dynamics 365 Business Central.
MIT License
773 stars 610 forks source link

Event change in codeunit 12 #27312

Open SilviuVirlan opened 1 week ago

SilviuVirlan commented 1 week ago

Describe the request

This is in CU12 ???Base App???:

[IntegrationEvent(true, false)]
local procedure OnBeforePostDtldVendLedgEntryUnapply(GenJournalLine: Record "Gen. Journal Line"; DetailedCVLedgEntryBuffer: Record "Detailed CV Ledg. Entry Buffer"; VendPostingGr: Record "Vendor Posting Group"; OriginalTransactionNo: Integer; var IsHandled: Boolean)
begin
end;

It would have been more convenient to have the GenJournalLine rec as parameter passed by reference.

Thanks! Silviu.

Additional context

During a Void Check (financially with un-apply) I stumbled upon an event yesterday and I???m not sure if indeed the intention was to skip passing by reference one param so developers overwrite the whole method. I only wanted to initialize 2 custom fields on GJL record. I ended up using another event which allowed me to fill up the values of my custom fields, and preserve them after subscriber ends. image

Internal work item: AB#550253