microsoft / ALAppExtensions

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

[Performance] Codeunit 11000001 "Financial Interface Telebank" - SetApplyCVLedgerEntries - use AutoCalcField #27643

Open neverbeam opened 4 days ago

neverbeam commented 4 days ago

Describe the request

Please make use of the SetAutoCalcFields instead of Calcfields on the Procedure "SetApplyCVLedgerEntries" from codeunit 11000001 "Financial Interface Telebank". This way the Microsoft code can be used by external parties as it will have ok performance. This is regarding the Dutch Localization for telebanking. The concerning procedure is called in a loop a lot of times, so it has a large performance impact.

Change: CustLedgerEntry.CalcFields("Payments in Process"); VendorLedgerEntry.CalcFields("Payments in Process"); EmployeeLedgerEntry.CalcFields("Payments in Process");

To CustLedgerEntry.SetAutoCalcFields("Payments in Process"); VendorLedgerEntry.SetAutoCalcFields("Payments in Process"); EmployeeLedgerEntry.SetAutoCalcFields("Payments in Process");

Additional context

The microsoft code we extend upon should have a good performance. Internal work item: AB#558156