Hello everyone,
I'm quite new to this field, sorry for the newbie question. I guess the solution will be something trivial.
I Created a new, editable field in the Purchase Header table. I want to let the user set it’s value on the Purchase Order Page (P50), more precisely on the Purchase Order Subpage (P54).
I added a new control to the subpage, set its SourceExpr to "PurchHeader.MyNewField".
However, I just can’t update its value, it remains the default 0.00 as I refresh the page (I’ve turned edit mode on). Why? How could I store the new values of this custom field?
Thank you for any help & advice.
Answers
What you need to do is to push your change on the subpage into the database, and then make the header page to re-read the purchase header rec (basically force refreshing the whole document page)
Dynamics NAV, MS SQL Server, Wherescape RED;
PRINCE2 Practitioner - License GR657010572SG
GDPR Certified Data Protection Officer - PECB License DPCDPO1025070-2018-03
And how do I push the change to the database? I've tried to use SAVERECORD function in the OnValidate trigger of the new field, didn't work.
EDIT: I figured out that if I use MODIFY at the OnValidate trigger of the subpage field, it works. But isn't this an ugly solution? I thought that VALIDATE saves the new value of the field.