Thursday, September 3, 2009

Page.RUNMODAL

Like in the Standard forms in the NAV 2009, pages also have the option to run it as Page.RUNMODAL.

CLEAR(SomePage)

SomePage.XXX; // any user-defined function

SomePage.SETTABLEVIEW(MyRecord);

SomePage.SETRECORD(MyRecord);

IF SomePage.RUNMODAL = Action::LookupOK THEN

SomePage.GETRECORD(MyRecord)...


If you want to use Page.RUNMODAL, we should be careful about the PageType property of the page.



PageType property should be Worksheet to show the fields in the page in proper order like below.





If the PageType property is not correct, then fields in the page will not be shown in the proper order.



The page shown above is for example purpose.

No comments:

Post a Comment