Do you remember my post about The complexity of complex return types?
And the update The complexity of complex return types (updated) – Looping a record return type?
Well, since the release of Microsoft Dynamics 365 Business Central 18.4, I have a another update for you! Let’s call it an “extension” for the update 🤪.
As I mentioned in the second post that it actually WAS possible to loop a returned record by using the GetView/SetView methods.
Since 18.4, the signature of the “Record.Copy” method is changed, where the “ByRef” is removed. So now, we could also use the more intuitive “Copy” method, to implement the loop:
You’ll need the new compiler (the latest AL Language extension (7.4.496506) seems to already support the new signature), and the application needs to be on the 18.4 platform, obviously.
Thanks Natalie, for keeping a close look at all these GitHub issues 😉