Export (0) Print
Expand All

FORM.RUN Function (Form)

Microsoft Dynamics Nav 2009

Creates and launches a form object, which you specify. If, at design time, you do not know the specific form that you want to run, use this function or the FORM.RUNMODAL Function (Form).

FORM.RUN(Number [, Record] [, Field])



Type: Integer

A number that identifies a form object. If you enter zero (0), the default lookup window for the current form is displayed. You can use the Symbols option on the View menu to choose from a list.

If the form that you specify does not exist, a run-time error occurs.


Type: Record

The Form.RUN function shows, by default, the record last displayed on the form. For each object, information about the most recently shown record and the attached key and filters is stored.

Use this optional parameter to select a specific record to display on the form. The record must be of the same type as the table attached to the window. When the record is displayed, the key and filters attached to the record are used.


Type: Field

Use this optional parameter to select a specific field on which focus will be placed.

When you want to close the form, use CurrForm.CLOSE. CurrForm is a predefined system variable.

For more information about system-defined variables, see System-Defined Variables.


If you have code that calls the FORM.RUN function and you run this code on the NAV Server, then the code is translated to call the PAGE.RUN Function instead.

This example shows how to run form 4711.


Community Additions

© 2015 Microsoft