Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

Form Classes [AX 2012]

Updated: November 16, 2011

Applies To: Microsoft Dynamics AX 2012 R3, Microsoft Dynamics AX 2012 R2, Microsoft Dynamics AX 2012 Feature Pack, Microsoft Dynamics AX 2012

You use Form classes to create, modify, or run forms by using X++ code. You often use classes to modify forms during run time. For example, you want to hide one or more controls on a form when you click a specified type of record in the form.

The form classes are all system classes and are prefixed with Form. Examples of form classes include FormRun, FormStringControl, FormBuildDesign.

The form classes are in the following class type categories:

Class type

Description

Form build

Used when you design the form.

Form run

Used when the form is executed.

The following table describes the most frequently used form classes. For a complete list of form classes, expand the System Documentation\Classes node in the Application Object Tree (AOT).

Class name

Description

Form

Use the methods of the class to add data sources and controls to the form. This is a form run type class that contains methods that you can use to access the properties of the form.

You can use this class to create a form with X++ code instead of using the AOT. For more information, see Using Classes to Create Forms.

Some of the methods in this class are available for overriding on a form in the AOT. For more information, see Methods on a Form.

FormRun

Use the methods of the class to execute a form. This is a form run type class.

NoteNote
To follow best practices for instantiating a form, use MenuFunction instead of FormRun.

FormDesign

Use the methods of the class to add controls to the form. This is a form run type class that contains methods that you can use to access the properties on the Design node for a form.

FormBuildDesign

Use the methods of the class to add controls to the form. This is a form build type class that contains methods that you can use to access the properties in the Design node of the form;

You can use this class to specify the graphical layout of a form by using X++ code.

FormDataSource

Use the methods of the class to change the behavior of the data source (caching, validation, and others). You can use methods to change the notification events for a record in the form. This is a form run type class that contains methods that you use to access the properties of a form data source.

A subset of the methods in this class is available for overriding on form data sources. For more information, see Methods on a Form Data Source.

FormBuildDataSource

Use the methods of the class to work with the properties on a form data source. This is a form build type class that contains methods that you use to access the properties of the form data source.

FormControl

Use the methods of the class to work with a control. This is a form run type class that contains property methods that you use to access the properties that are common to all control types.

FormControl is the parent class for all form control classes. To access the properties of a specific type of control, you should use methods from the class for that control instead of this parent class.

Form<control name>Control

For example, FormStringControl, and FormTreeControl.

Use the methods of the class to work with a specified control type. This is a form run type class that contains methods that you use to work with the specified control type.

For a list of all the form control classes, see Form Control Classes. A subset of the methods in these classes is available for overriding on controls. For more information, see Methods on Form Controls.

FormBuild<control name>Control

For example, FormBuildStringControl, and FormBuildTreeControl.

Use the methods of the class to work with the properties of a specified control type. This is a form build type class that contains methods that you use to work with a specified control type.


Announcements: New book: "Inside Microsoft Dynamics AX 2012 R3" now available. Get your copy at the MS Press Store.

Community Additions

ADD
Show:
© 2015 Microsoft