Walkthrough: Transforming a Standard Application Form

Microsoft Dynamics Nav 2009

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.

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:

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.

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

  1. Create a folder called FormTransformation on the C: drive of the server running Microsoft Dynamics NAV 2009.

  2. Copy the contents of the TransformationTool folder, which includes the TIF Editor folder, from the installation media.

  3. In the Classic client, on the Tools menu, click Object Designer.

  4. On the File menu, click Import.

  5. In the Import Objects window, select the TIF.fob file, and then click Open.

    NoteNote

    The TIF.fob file is located in the TIF Editor folder, which you copied in step 1.

  6. Click Yes to import all objects.

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

  1. In Object Designer, click Form, select form 177000, Transformation Forms, and then click Run.

  2. In the Transformation Forms window, click Setup, and then click Transformation Setup Card.

  3. In the Transformation Setup window, under TIF path Import, enter C:\FormTransformation.

  4. Close the Transformation Setup window to save your changes.

  5. In the Transformation Forms window, click Setup, and then click Import All Transformation Input.

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

  1. In the Transformation Forms window, select form 21, Customer Card, click Input, point to Add, and then click FactBoxes.

  2. 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.

  3. Close the FactBox - FactBoxes window.

  4. In the Transformation Forms window, select form 21, Customer Card, click Input, point to Add by Caption, and then click Image to Action.

  5. 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

  6. Close the Add Image by Caption window.

  7. In the Transformation Forms window, select form 21, Customer Card, click Input, point to Add by Caption, and then click Big Image to Action.

  8. 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.

  9. In the Transformation Forms window, , select form 21, Customer Card, click Input, point to Add, and then click New and Promoted Actions.

  10. 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.

  11. In the Transformation Forms window, select form 21, Customer Card, click Input, point to Add, and then click New Control Property.

  12. 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"

  13. 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.

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

  1. In the Transformation Forms window, click Setup, and then click Import FT-PT Mapping.

  2. In the Import/Export Form Types window, in the File Name field, click the ellipsis button (...).

  3. In the Dataport Import File Name window, browse to the C:\FormTransformation\TIF Editor folder, select the FormToPageTypeMapping.txt file, and then click Open.

  4. In the Import/Export Form Types window, under Direction, select Import, and then click OK.

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

  1. In the Transformation Forms window, click Functions, and then click Validate.

  2. In the Page Validation Entries window, verify that there are no warnings for PageID 21.

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

  1. In the Transformation Forms window, click Functions, point to Create Transformation Input, and then click Transform Pages.

  2. In the Save TransformPages window, navigate to the C:\FormTransformation folder, select TransformPages.xml, and then click Save.

  3. In the Transformation Forms window, click Functions, point to Create Transformation Input, and then click Move Page Elements.

  4. In the Save MoveElements window, navigate to the C:\FormTransformation folder, select MoveElements.xml, and then click Save.

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

  1. In the Classic client, on the Tools menu, click Object Designer.

  2. In Object Designer, click Form.

  3. Select Form 21, Customer Card, click the File menu, and then click Export.

  4. In the Export Objects window, browse to the c:\FormTransformation folder. In the File name text box, enter Forms.xml.

  5. In the Save As Type drop-down list, select XML Format (*.xml), and then click Save.

  6. Navigate to the C:\FormTransformation folder.

  7. Double-click Microsoft.Dynamics.Nav.Tools.FormTransformation.exe.

  8. Verify that the tool completes successfully and that you have the following output files in the c:\FormTransformation folder:

    • Pages.xml

    • Transformation.log

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

  1. In the Classic client, on the Tools menu, click Object Designer.

  2. On the File menu, click Import.

  3. 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.

  4. In Object Designer, click Page, and then select Page 21, Customer Card.

  5. On the Tools menu, click Compile, and then click Yes.

  6. Type the following command at a command prompt to run the transformed page in the RoleTailored client:

    DynamicsNAV:////runpage?Page=21

Community Additions

ADD
Show: