Udostępnij za pośrednictwem


Form Overview

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

A form is a window that you open from the Microsoft Dynamics AX client workspace that shows information and enables you to perform actions. For example, the following figure shows the form you use to view and enter information about a customer. Notice how the form has tabs, fields, and buttons that you can use to view, update, and perform actions with a customer record.

Customer details form

Details form

Form Design Patterns

To create a form, you should first select a design pattern for that form. A design pattern is a set of guidelines that standardize the appearance and use of a form. You should select the design pattern that reflects the type of data that appears in the form and how you expect to use the form. For more information about form design, see Client User Experience Guidelines.

The following sections provide an overview of the design patterns. There are patterns for forms that open in a separate window and for navigation forms that appear in the client workspace.

Aa844397.collapse_all(en-us,AX.60).gifForms

The following table lists the design patterns for forms. For more information about these patterns, see Form User Experience Guidelines.

Pattern

Description

Details form

You use the form to view, enter and update an individual record. In addition, the form enables you to perform actions on that record.

Details form with lines

You use the form to view, enter and update an individual record that is associated with one or more related lines. In addition, the form enables you to perform actions on that record and the lines.

Dialog

You use the form to initiate a task or process where you must provide input. The form enables you to specify whether to continue or cancel the task or process.

Drop dialog

You use the form to enter or update a small amount of data. The form enables you to enter data values without having to leave the parent form.

Simple details

You use the form to view, enter and update a record. You use the form for setup information or a record that is dependent upon another record.

Simple list

You use the form to view, enter, and update records that appear as a list of records in a grid.

Simple list and details

You use the form to view a list of records and a details form at the same time. The detail section of the form shows additional fields for the highlighted record in the list.

Table of contents

You use the form to complete a series of related setup or configuration tasks. The form includes a list of buttons that you click to specify the fields that appear in the form.

You might notice that there are no design patterns for journal and inquiry forms. The structures of these forms are dependent upon the data and the process they support. As a result, there are no standard design patterns for these types of forms.

Aa844397.collapse_all(en-us,AX.60).gifNavigation Forms

You use navigation forms to find information, open forms, and perform actions. For example, you use a list page to find a single record or a collection of records that you want to work with. Unlike other forms, navigation forms open in the content pane of the client workspace.

The following table shows the types of navigation forms that you can create. For more information about these patterns, see Navigation User Experience Guidelines.

Pattern

Description

Area page

You use the form to list links to list pages, content pages, forms, reports, classes, jobs, and queries for a module.

List page

You use the form to view a list of records. You use the list page to browse records, select one or more records, and perform an action upon the highlighted record or records.

Role center

You use the role center to shows a collection of information that is relevant to your Microsoft Dynamics AX role.

Form Development

You use the Application Object Tree (AOT) to create a new form. The AOT enables you to add form components, and to view and set values for the properties of the form. You use property values to specify the appearance and behavior of the form. If the desired behavior cannot be set by using properties, you can use X++ code to customize form behavior. For information about how to create a form, see Walkthrough: Creating a Form by Using the AOT.

Tip

To enable the reuse of code, you should add X++ code to the data sources (tables) or a class instead of the form.

Aa844397.collapse_all(en-us,AX.60).gifTemplates

To create a form that implements a design pattern, you use a form template. The template generates a new form that has the basic structure and components specified by the design pattern. The template reduces the number of steps that you have to complete to create the new form. For an example that shows how to use a template to create a form, see Walkthrough: Creating a List Page and Adding an Action Pane.

To create a form with a template, right-click Forms in the AOT, click New Form from template, and then click the template that specifies the type of form you want to create. A form is generated from the specified template. The new form contains controls that implement the form structure specified by the design pattern for that form. In addition, several properties are populated with values that apply to the specified type of form. To complete the form, you add controls that provide access to the data and actions that the form supports.

For example, you use the AOT to create a form and you click the SimpleListDetails template. If you expand the Design node of the new form, you see that the form already includes several controls. In addition, The Style property in the Design node of that form is set to SimpleListDetails.

The following table lists the templates and describes the types of forms the templates create.

Template

Purpose

DetailsFormMaster

Use the template to create a Details form to view, edit, and act on master data.

DetailsFormTransaction

Use the template to create details form with lines to view, edit, and act on master data that has line items.

Dialog

Use the template to create a dialog window that provides a response to a question.

DropDialog

Use the template to create a drop dialog form to perform an action with data.

ListPage

Use the template to create a list page you can use to find, analyze, and performs actions on master data.

SimpleList

Use the template to create a simple list form to view, edit, and act on dependent or reference data.

SimpleListDetails

Use the template to create a simple list and details form to view, edit, and act on dependent and reference data.

TableOfContents

Use the template to create a table of contents form to view and edit configuration or setup data.

Aa844397.collapse_all(en-us,AX.60).gifForm Style Properties

Each form has one or more properties that you can use to specify the design pattern for the form. These properties are called metadata style properties. When you specify a value for the metadata style property, you enable the client framework to substitute values at runtime for several other form and control properties.

You use metadata style properties to simplify form development. When you specify a value for the Design.Style property, you reduce the number of form property changes you have to make. The selection of a form style has the following effect on form and control properties.

  • If the style requires a form or control property to have a specified value, that property is made inactive in the AOT property sheet. The property is populated with the required value at runtime when the form is opened.

  • If the style has recommended values for some form and control properties, the client framework populates the property by using the recommended value when the form opens. However, the client framework only uses the template value if the AOT property sheet shows the default value for that property. As a result, you can override template specified property value by using the AOT to set a non-default value for a property.

The following table describes the properties you can use to specify the metadata style for a form.

Property

Description

Design.Style

You use this property to specify the design pattern for a form. If you use a template to create a form, the property is set to reflect the design pattern that the template uses.

You should verify that the Style property accurately reflects the type of form you want to create. If you want to validate the form design, the validation tool uses the Style property to identify the validation template for the form.

In addition, you can use the Properties sheet of the AOT to manually set or change the Style property of a form.

Form.FormTemplate

You use this property to specify whether the form uses an interaction class. All list pages require that you use an interaction class. The interaction class enables the list page to appear in both the client and Enterprise Portal.

Caution

If you specify a value for the property, you also have to populate the InteractionClass property. The property specifies the name of an interaction class. The default class for list pages is the ListPageInteraction class.

You can also set the FormTemplate property for a details form. You can use an interaction class to help improve the performance of the details form. However, details forms do not require an interaction class.

Aa844397.collapse_all(en-us,AX.60).gifComponents

To complete the form, you add form components that retrieve data, specify how the data is used and displayed, and set security permissions for the form. The following table lists the components you find under each form node in the AOT.

Name

Description

Methods

You add or override X++ methods for the form. You can use X++ to customize the appearance and behavior of the form. For more information about form methods, see Methods on a Form.

Data Sources

You specify the database query, table, or view that the form uses to retrieve the data that appears in the form. For more information about the form data source, see Form Data Sources.

Parts

You add Parts that appear on the form. A Part is a specialized type of control that provides information related to the record that appears in the form. List pages and details forms have a FactBox pane or preview pane where the Parts appear. For more information about Parts, see Parts.

Designs

You add the controls that appear on the form to the Design node of the form. For more information about how to add controls, see, Using Controls in a Form Design.

Permissions

You specify access levels for the securable objects that appear in the form. For more information about security, see Security Permissions Properties for a Form.

Validation

The Development Workspace includes a tool you can use to validate a form. You use form validation to identify differences between the design of the form you created and the form design pattern best practices for that type of form. Validation helps you create forms that follow the form design patterns used throughout the client.

To validate a form, you use the form style best practice tool. The form style best practice tool compares the structure of the form and the values that you specified for form and control properties to a standard form design template. The form style best practice tool uses the value in the Design.Style property of the form to determine the template that is used to validate the form.

To use the form style best practice tool, right-click a form in the AOT, click Add-Ins, and then click Check form style best practices. The Form style analysis window opens and lists the form style best practice violations for that form. You can use Fix violation button to quickly fix many design issues with the form. You can also use the Re-analyze button to repeat the validation of the form. For more information about how to use the form style best practice tool, see How to: Validate the Style of a New Form or How to: Convert an Existing Form to a New Style.

See also

Form Data Sources

Controls in Microsoft Dynamics AX

Parts

Menus and Menu Items

Enterprise Portal for Microsoft Dynamics AX

User Experience Guidelines for Microsoft Dynamics AX 2012

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