AX2012 User Interfaces 03
AX2012 User Interfaces 03
Introduction
This course discusses how to develop the user interface without having to write any code. Forms are created so that the end-user can enter and view data. To make navigation easier for the end-user, menus and menu items will be created.
Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement
3-1
Forms
Forms are the primary method of interaction between Microsoft Dynamics AX and the end-user. By understanding and exploring existing forms, new forms can be developed while retaining the same look and feel as standard Microsoft Dynamics AX forms.
To examine these categories, open the Application Object Tree (AOT) and locate the CustTable form within the Forms branch of the AOT and expand the CustTable form node as shown in the figure.
Form methods are blocks of X++ code that, for example, are executed when opening or closing the Form. Form methods are discussed in a later development course. This course discusses Data sources, Designs and Parts. The next chapter will discuss Permissions.
Form Designs
Several different standard form designs are available for use in different situations. To better understand Forms and their design, this course will examine some of the forms in the application.
3-2
Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement
The main part of the form is the grid that displays a list of customers. Immediately above the grid is a filter. At the top is the Action Pane containing buttons that will take you to another form, or process an action. On the right is the FactBox pane that displays information from other tables linked to the customer record that are currently highlighted. At the bottom is the Preview Pane, showing more information from the customer table. Now in the developer workspace, locate the form CustTableListPage. Expand the Parts node, and the Designs > Design node.
Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement
3-3
In the Design node, the Action Pane, the Filter, and the Grid are visible. The Parts node includes links to the parts displayed on the form. The first part is the CustListPagePreviewPane, and the other parts are the FactBox parts. If you expand the Grid node, the fields on the grid are visible.
3-4
Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement
The form also includes an Action Pane and a FactBox Pane. The main part of the form has FastTabs. You can click on each FastTab to obtain more information about the customer. At the bottom of the form in the status bar, there are a number of navigation buttons. If you click the Grid View button, the form displays records in grid form, and you can select another customer record. You can click on Details View to show the details again.
Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement
3-5
The TabHeader shows the tabs that comprise the FastTabs on the Details View. Under the TabPageGrid node is the grid that makes up the Grid View.
3-6
Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement
Here is a more simple form with a grid section and some additional fields at the bottom.
Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement
3-7
3-8
Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement
The Property sheet lists properties for the PriceDiscTable data source on the PriceDiscTable form. For example, the AllowCreate and AllowDelete properties control whether you can create new rows or delete old rows from the price agreement form. The Table property specifies the table the data source is based on (in this case, the PriceDiscTable). The Index Property controls the index that is used for sorting data within the form. More than a single data source can be used on a form; the linking of data between sources is performed by using the JoinSource Properties. Joining data sources on a form is examined later in this chapter. Viewing the properties for the InventDim data source on this form, shows that it is joined to the PriceDiscTable. The system uses relations between the tables to join records together. Expanding the PriceDiscTable data source shows a Fields node. Under this list all the fields on the table. Properties can be set here to control the behavior of the field when it is used as a control on the form, including allowing the field to be edited and whether it is visible or not.
Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement
3-9
3-10
Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement
Challenge Yourself!
Create a new form that can be used to view, create and edit records in the VetBreedTable table.
Step by Step
1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. In the AOT, right-click the Forms node and select New Form Rename the form to VetBreedTable. In a second AOT, locate the table VetBreedTable. Drag the table VetBreedTable to the DataSources node on the VetBreedTable form. Expand the Designs node on the VetBreedTable form. Right-click the Design node and select New Control > Grid. A new Grid control is created. Expand the DataSources > VetBreedTable > Fields node. Drag the fields BreedId and Name to the grid control. On the properties sheet for the Design node, in the Caption property, enter "Breed". Save your changes to the form. Open the form by pressing Ctrl+O.
Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement
3-11
3-12
Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement
Menus Items
You can use menu items to activate application objects from the user interface. Menu properties include the following: Name: The name of this menu item Label: The label appearing on the menu item ObjectType: The type of object this item points to Object: The object name that this item points to
Three types of menu items can be created: Display - used for forms Output - used for reports Action - used for running processes
Output and Action menu items are discussed in other training courses.
Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement
3-13
There are two important Properties to notice. Object type = Form Object = CustTableListPage
3-14
Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement
Form Templates
Some form templates are available to help create the correct form type with the appropriate controls, and to keep the design consistent across the application. The following table shows the available form templates and where they should be used. Form Template ListPage DetailsFormMaster DetailsFormTransaction SimpleListDetails SimpleList TableOfContents Dialog Use Main entry in to a module. View and edit master data. View and edit transactional and worksheet data. Reference and setup data. Basic inquiry. Module configuration parameters. Quick user interaction.
Examples of Templates
The following table gives examples of each form template Form Template ListPage DetailsFormMaster DetailsFormTransa ction SimpleListDetails SimpleList TableOfContents Dialog Menu path Accounts receivable > Common > Customers > All Customers Accounts receivable > Common > Customers > All Customers > Edit Sales and marketing > Common > Sales Orders > All sales orders > Edit General ledger > Setup > Currency > Currencies Master planning > Inquiries > Processes > Planned orders log Accounts payable > Setup > Accounts payable parameters Product information management > Products > Products > New product
To create a form using a template, right-click the Forms node in the AOT, select New Form From Template, and then select the template. Try to create each template and examine the controls and design that is created. Then open the corresponding form in the application, as shown above, and look at the finished product.
Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement
3-15
Challenge Yourself!
Create a form using a SimpleListDetails template. In the grid on the left it should show the Pet Name and Gender from the VetCustPetTable table. In the details section on the right of the form, it should show the Breed name. Additionally, create a menu item for the form, however do not add the menu item to a menu you will use the menu item in the next section.
Step by Step
1. Right click the Forms node of the AOT and select New Form from Template > SimpleListDetails. 2. Rename the form VetCustPetTable. 3. Drag the table VetCustPetTable from a second AOT to the datasources node of the new form. 4. Set the data source property on the grid control on the form to VetCustPetTable. The grid control can be found by expanding Designs > Design > Group:Body > Group:GridContainer. 5. Drag the BreedId, Name and Gender fields to the grid of the designs node. 6. Save your changes to the form. 7. Drag the VetCustPetTable form to the Menu Items > Display node in a second AOT to create a menu item for the new form. 8. In the property sheet for the new menu item, set the Label property to Pets. 9. Close the property sheet and save your changes to the menu item.
3-16
Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement
List Pages
List pages are the primary method of displaying data in Microsoft Dynamics AX. They can show lots of data from many tables, in a number of formats. They have consistent designs and functions. They can easily be displayed in the enterprise portal.
The components of a list page are: The Grid displays a list of records. It displays only a few of the most important fields for each record. The Filter bar is used to enter search criteria. This filters the list in the data grid to show only the records which an end-user is interested in. The Preview Pane displays more fields about the selected record. This helps to ensure you have selected the correct record in your search. FactBoxes display more information about the selected record from related tables. The Action Pane contains menu items you can use to do typical tasks related to the highlighted record.
Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement
3-17
3-18
Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement
FactBoxes
A FactBox is a small selection of data related to the current record in the list page. Three types of Factbox exist: Info part: This has its own data source and a number of controls. It is limited in what can be displayed. However it is simple and quick to create, and can also be displayed in the Enterprise Portal. Form part: This is a link to a form. The form can have the same controls as a standard form. However since this is displayed in the FactBox section of the list page, adding too many controls can crowd the part. Cues: This is a count of a number of records related to the current record in the list page. For example, it might show the number of outstanding invoices for a customer.
Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement
3-19
3-20
Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement
11. 12.
Summary
This course discussed how to develop the user interface using the drag and drop features of the Application Object Tree. Additionally, this course showed some of the different features of a form, how to create a form, how to have multiple linked tables on a form, and how to create menu items and add them to menus and other forms. The course also showed how to modify a list page and create a FactBox for a list page.
Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement
3-21
3-22
Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement
2.
3.
Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement
3-23
Solutions
Test Your Knowledge
1. What are the five elements that make up a form? ( ) Methods, Data Sources, Views, Parts and Fields () Designs, Methods, Data Sources, Parts and Permissions ( ) Display Menu Items, Data Sources, Methods, Enums and Designs ( ) Jobs, Menu Items, Classes, Parts and Macros 2. How can the Area Pages be customized? ( ) By making changes to the Areas node in the AOT () By making changes to the Menus that the Areas page will automatically be generated from ( ) By setting the IsDisplayedInContentArea property of the Navigation Pane ( ) The Area Pages cannot be changed 3. Which of the following are available Form Templates? (Select all that apply) () ListPage ( ) TransactionPage ( ) WebPage () SimpleListDetails 4. Which of the following are available Menu Items? (Select all that apply) () Display Menu Items () Output Menu Items ( ) Project Menu Items () Action Menu Items
3-24
Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement