Would U like to tell me function about update/refresh subform. Like I found that should be new function because CurrPage.Update doesn't work. I need to update 2 fields in purchase order subform.
Well you can call subform's UPDATE from inside parent page. One solution is:
In the subform page add a new fuction in C/AL Globals named UpdateForm (with a parameter as Boolean) then add the following code in the function:
CurrPage.UPDATE(<boolean parameter name>);
Now to refresh the line, go back to your parent page and add the below code in OnValidate tirgger of the control on the header that you are updating:
** supposed PurchLines is the name of the subform page part control
No I don't need to update control in a main (Purchase Order page), I need in a sub form. The fields that I am changing are new fields in a a Subform Purchase Order Page.
Can I do the same for the subform? Should I explain more specific?
The code by Jay is updating the subform (PurchLines) from the main page (currPage), so if that's not the problem, then what is? You should just call this code CurrPage.PurchLines.FORM.UpdateForm(TRUE);
But which version are you using and is it forms or pages? (You mention both in your post).
Best regards,Erik P. Ernst
Don't forget to "Verify Solution" the post(s) that solved your problem. This credits the experts who helped, earns you points and marks your thread as Resolved so we all know you have been helped.
© 1995-2013 Dynamics User Group, all rights reserved.