Loading...

Difference in pass-by value vs pass-by reference in AL language

Difference in pass-by value vs pass-by reference in AL language
Important detail that caused me a bug recently and I want to share with others who are writing AL Code for Business Central. When you pass a record to a procedure then you can do that either by pass-by value or pass-by reference. When you have code like this: CurrPage.SetSelectionFilter(ApprovalEntriesSelected); ApproveEntry(ApprovalEntriesSelected); and you pass-by value: procedure ApproveEntry(Entry: Record "Approval Workflow Entry") then all filters are cleared on the record and you get a empty record on your procedure.

Published on:

Learn more
Posts on Microsoft Dynamics 365 Business Central Development
Posts on Microsoft Dynamics 365 Business Central Development

Recent content in Posts on Microsoft Dynamics 365 Business Central Development

Share post:

Related posts

Stay up to date with latest Microsoft Dynamics 365 and Power Platform news!
* Yes, I agree to the privacy policy