In this walkthrough, you will learn how to transform form 21, Customer Card, from a form that you use in the Classic client to a Customer Card page that you can use in the RoleTailored client. Because this form is a standard application form, the transformation includes the changes in the standard application transformation input files and additional changes that are specific to the customer.
About This Walkthrough
This walkthrough illustrates the following tasks:
-
Installing the form transformation tool and the Transformation Input File (TIF) Editor
-
Importing the transformation input files for the standard application
-
Modifying the transformation input files by using the TIF Editor
-
Validating form transformation
-
Exporting the transformation input files
-
Transforming the form
-
Importing, compiling, and running the transformed page
Prerequisites
To complete this walkthrough, you will need:
-
Microsoft Dynamics NAV 2009 installed with a developer license.
-
All Microsoft Dynamics NAV 2009 requirements met. For more information, see Microsoft Dynamics NAV 2009 SP1 Requirements.
Story
Simon is a Microsoft Certified Partner working for CRONUS International. He has been asked to transform the forms for CRONUS International from Microsoft Dynamics NAV 2009 forms to pages so that CRONUS can use the RoleTailored client. He plans to start by transforming the Customer Card form, which is a standard application form, so that he can understand the form transformation process. Simon has been asked to include the following elements on the transformed page:
-
Customer Sales History FactBox
-
Customer Statistics FactBox
-
Icons in the Action Pane for creating new sales invoices, sales orders, and reminders
-
Icons in the Action Pane for applying a template, viewing the cash receipt journal and viewing the customer statistics
-
A big icon in the Action Pane for viewing the sales journal
-
An icon in the Action Pane for viewing the Customer - Balance to Date report
-
FastTabs that include useful information when collapsed, including:
-
Customer number
-
Customer name
-
Contact
-
Phone number
-
E-mail address
-
City
-
Simon will use the form transformation tool to transform the Customer Card form to the Customer Card page. Simon has chosen to use the TIF Editor to simplify his task of creating the input files for the form transformation tool.
Installing the Form Transformation Tool and TIF Editor
To install the form transformation tool, you must copy files to the server where you are running Microsoft Dynamics NAV 2009. After you install the form transformation tool, you can install the TIF Editor.
To install the form transformation tool and TIF Editor
-
Create a folder called FormTransformation on the C: drive of the server running Microsoft Dynamics NAV 2009.
-
Copy the contents of the TransformationTool folder, which includes the TIF Editor folder, from the installation media.
-
In the Classic client, on the Tools menu, click Object Designer.
-
On the File menu, click Import.
-
In the Import Objects window, select the TIF.fob file, and then click Open.
Note The TIF.fob file is located in the TIF Editor folder, which you copied in step 1.
-
Click Yes to import all objects.
Importing the Transformation Input Files in the TIF Editor
When you installed the form transformation tool, you copied the following transformation input files for the standard application to your server running Microsoft Dynamics NAV 2009:
-
TransformPages.xml
-
IgnorePages.xml
-
MovePages.xml
-
DeleteElements.xml
-
MoveElements.xml
The form that you want to transform, form 21, Customer Card, is a standard application form. Therefore, the input specifications for transforming this form are contained in the transformation input files for the standard application. Before you transform the Customer Card form, if you want to use the TIF Editor to modify the transformation input files, you must import the standard application transformation input files into the TIF Editor.
To import the transformation input files into the TIF Editor
-
In Object Designer, click Form, select form 177000, Transformation Forms, and then click Run.
-
In the Transformation Forms window, click Setup, and then click Transformation Setup Card.
-
In the Transformation Setup window, under TIF path Import, enter C:\FormTransformation.
-
Close the Transformation Setup window to save your changes.
-
In the Transformation Forms window, click Setup, and then click Import All Transformation Input.
Modifying the Transformation Input Files in the TIF Editor
Now that you have imported the transformation input files for the standard application into the TIF Editor, you can modify the input specifications. Most elements that you have been asked to add to the page are already specified in the standard application transformation input files, so you only need to verify them in the TIF Editor. For any elements that are not already in the standard application transformation input files, you must add to the input specifications.
To modify the transformation input files in the TIF Editor
-
In the Transformation Forms window, select form 21, Customer Card, click Input, point to Add, and then click FactBoxes.
-
Verify that the FactBox - FactBoxes window includes the following pages:
-
Part Name field is Sales Hist. Sell-to FactBox and Visible field is selected.
-
Part Name field is Customer Statistics FactBox and Visible field is selected.
-
-
Close the FactBox - FactBoxes window.
-
In the Transformation Forms window, select form 21, Customer Card, click Input, point to Add by Caption, and then click Image to Action.
-
Verify that the Add Image by Caption window includes lines in which the CaptionML fields are the following values:
-
ENU=Sales Invoice
-
ENU=Sales Journal
-
ENU=Reminders
-
ENU=Apply Template
-
ENU=Cash Receipt Journal
-
ENU=Statistics
-
-
Close the Add Image by Caption window.
-
In the Transformation Forms window, select form 21, Customer Card, click Input, point to Add by Caption, and then click Big Image to Action.
-
In the Add Big Image by Caption window, on a new line, enter ENU=Sales Journal in the CaptionML field, and then close the Add Big Image by Caption window.
-
In the Transformation Forms window, , select form 21, Customer Card, click Input, point to Add, and then click New and Promoted Actions.
-
Verify that the Page Actions window includes a line in which the CaptionML field is ENU=Customer - Balance to Date and the ActionsType field is Reports, and then close the Page Actions window.
-
In the Transformation Forms window, select form 21, Customer Card, click Input, point to Add, and then click New Control Property.
-
Verify that the Move Page Elements window includes lines in which the Group field is PromotedField and the ControlID and Description fields are the following values:
-
2, "No."
-
4, "Name"
-
16, "Contact"
-
103, "Phone No."
-
107, "E-Mail"
-
-
In the Move Page Elements window, on a new line, select PromotedField from the Group drop-down list, enter 10 in the ControlID field, enter "City" in the Description field, and then close the Move Page Elements window.
Importing Form to Page Mappings
Before you transform a form to a page, you must specify the page type for the transformed page. To simplify the task of specifying page types, you can instead specify the form type for the form that you want to transform, and then import into the TIF Editor a file that maps form types to page types. This mapping file is one of the files that you copied when you installed the form transformation tool.
Because the form type and page type for the Customer Card form are specified in the standard application transformation input files, you do not need to import the mapping file into the TIF Editor for specifying the page type. However, to validate the input specifications, the TIF Editor must have the form-to-page mapping information. Therefore, before you validate, you must import the form-to-page mappings.
To import form to page mappings
-
In the Transformation Forms window, click Setup, and then click Import FT-PT Mapping.
-
In the Import/Export Form Types window, in the File Name field, click the ellipsis button (...).
-
In the Dataport Import File Name window, browse to the C:\FormTransformation\TIF Editor folder, select the FormToPageTypeMapping.txt file, and then click Open.
-
In the Import/Export Form Types window, under Direction, select Import, and then click OK.
Validating Form Transformation
Before you export transformation input specifications from the TIF Editor to .xml input files, you can validate the input that you have specified in the TIF Editor. If there are any validation issues, you can fix them before you create the .xml input files.
To validate the form transformation
-
In the Transformation Forms window, click Functions, and then click Validate.
-
In the Page Validation Entries window, verify that there are no warnings for PageID 21.
Exporting Transformation Input Files
Now that you have modified the input specifications in the TIF Editor and validated that input, you must export the input specifications to the transformation input files. The modifications in this walkthrough changed the input specifications in the TransformPages.xml file and the MoveElements.xml file. You must export these two files. The modifications in this walkthrough did not change the input specifications in the IgnorePages.xml file, the MovePages.xml file, or the DeleteElements.xml file. You can use the original standard application files that you copied when you installed the form transformation tool for these unchanged files.
For more information about each of the transformation input files, see Understanding Form Transformation Input Files.
To export the transformation input files
-
In the Transformation Forms window, click Functions, point to Create Transformation Input, and then click Transform Pages.
-
In the Save TransformPages window, navigate to the C:\FormTransformation folder, select TransformPages.xml, and then click Save.
-
In the Transformation Forms window, click Functions, point to Create Transformation Input, and then click Move Page Elements.
-
In the Save MoveElements window, navigate to the C:\FormTransformation folder, select MoveElements.xml, and then click Save.
Transforming the Form
To transform a form, you must create a source .xml file of the form. Typically, you also need to verify the form transformation configuration file for file locations and logging level. In this walkthrough, you did not change the file locations or names and you do not need to change the default logging level, so you do not need to verify the configuration file. After you create the source .xml file for the form, you can run the form transformation tool.
To transform the form
-
In the Classic client, on the Tools menu, click Object Designer.
-
In Object Designer, click Form.
-
Select Form 21, Customer Card, click the File menu, and then click Export.
-
In the Export Objects window, browse to the c:\FormTransformation folder. In the File name text box, enter Forms.xml.
-
In the Save As Type drop-down list, select XML Format (*.xml), and then click Save.
-
Navigate to the C:\FormTransformation folder.
-
Double-click Microsoft.Dynamics.Nav.Tools.FormTransformation.exe.
-
Verify that the tool completes successfully and that you have the following output files in the c:\FormTransformation folder:
-
Pages.xml
-
Transformation.log
-
Importing, Compiling, and Running the Transformed Page
Before you can view the transformed page in the RoleTailored client, you must import the page into Object Designer in the Classic client and compile the page.
To import, compile, and run the transformed page
-
In the Classic client, on the Tools menu, click Object Designer.
-
On the File menu, click Import.
-
In the Import Objects window, in the Files of type drop-down list, select XML Format (*.xml), browse to the C:\FormTransformation folder, select Pages.xml, and then click Open.
-
In Object Designer, click Page, and then select Page 21, Customer Card.
-
On the Tools menu, click Compile, and then click Yes.
-
Type the following command at a command prompt to run the transformed page in the RoleTailored client:
DynamicsNAV:////runpage?Page=21
See Also
© 2010 Microsoft Corporation. All rights reserved.