
Hello,
I'm on the latest version of Business Central. I extended the Purchase Invoice page. In the OnNewRecord trigger, I am trying to get the record before the blank new record is loaded. In the past in NAV, we used xRec to achieve this. Now, I get another record instead of the one on the page before clicking the new button. Has there been any changes with how xRec is used in Business Central? How do I capture a record that is displayed before pressing the new button on the page? In my case when there are two records No. 1 and 2, when record No. 1 is loaded on the page, and I click the new button to create a new invoice, xRec is No. 2 for some reason, I would expect it to be record No. 1? Any advice would be appreciated. Thanks.
Below is my code
Hello,
We currently do not have dedicated Dev support via the Dynamics 365 Business Central forums, but I wanted to provide you some additional resources to assist. If you need assistance with debugging or coding I would recommend discussing this on one of our communities.
dynamicsuser.net/.../developers
I will open this up to the community in case they have something to add.
Thanks.