microsoft / AL

Home of the Dynamics 365 Business Central AL Language extension for Visual Studio Code. Used to track issues regarding the latest version of the AL compiler and developer tools available in the Visual Studio Code Marketplace or as part of the AL Developer Preview builds for Dynamics 365 Business Central.
MIT License
747 stars 245 forks source link

CurrFieldNo in OnAfterInsert not set when set from TestPage (was #5400) #6945

Open dzzzb opened 2 years ago

dzzzb commented 2 years ago

https://github.com/microsoft/AL/issues/5400 is still an issue.


Through having written a bunch of code using it, I have determined that I wasted my time, as in BC CurrFieldNo does not work how it used to in NAV, as documented in: https://docs.microsoft.com/en-us/dynamics-nav/xrec-and-currfieldno

That link is the top search result on Google and Bing for "Business Central" CurrFieldNo... not a good look to have that outdated info, instead of an updated page for BC screaming THIS DOES NOT WORK ANYMORE...

It was written here: https://github.com/microsoft/AL/issues/4152#issuecomment-440182277

We have decided to only fix your second issue, since the first one is by design. If you invoke validate from the client, the `CurrFieldNo is updated, but if you invoke it from code, it isn't.

Anyway... I'll file a doc bug for that.


Back to AL itself - surely there should be an exception for Test data types, as they should emulate what will really happen in the client...?

but I have tested, so you don't have to, and the code in #5400 clearly does not.

Please advise. Thanks!


versions:

dzzzb commented 2 years ago

Anyway... I'll file a doc bug for that.

=> https://github.com/MicrosoftDocs/dynamics365smb-devitpro/issues/5772