Friday, November 27, 2009


In Microsoft Dynamics NAV, CurrForm.SAVERECORD or CurrPage.SAVERECORD is used to save the current record shown on the form/page. CurrForm.UPDATE(True or False) or CurrPage.UPDATE(True or False) is used to save the current record based on the parameter and updates the controls in the form/page.

Using the two functions together in the form/page does not give any error normally but error will be displayed in pages if the following code is called before inserting the record.

CurrPage.SAVERECORD();//Which save the record.
CurrPage.UPDATE;//Which updates the controls.

For Example: Add the above lines of code in the Type – OnValidate() in the “46 Sales Order Subform” page and try to insert the sales line.

image This is because above set of code is trying to insert the record in two places one is using SAVERECORD and second is UPDATE (even though Parameter is FALSE).

1 comment:

  1. CurrPage.UPDATE(TRUE); is also causing the same issue.

    Database of IN Country and Page 16477 is causing the same issue.

    Any comment?