How to: Create a Configuration Template

You can create a new data template if the default templates do not the needs of your new company. If you are creating more than one, you may find it useful to adopt a naming convention for the Code field.

Create a data template

Each template consists of a header and lines. When you create a template, you can specify which fields to always apply to data of a certain type. For example, you can create different customer templates to apply to different customer types. When you create the customer using a template, you can use template data to prepopulate certain fields.

To create a data template header

  1. Open the Config. Template List window.

  2. On the Home tab, in the New group, choose New.

  3. In the Code field, enter a unique ID for the template.

  4. In the Description field, enter a description of the template.

  5. In the Table ID field, enter the table to which this template applies. The Table Name field is automatically filled in when the Table ID field is set.

To create a data template line

  1. In the Lines FastTab, on the first line, select the Field Name field. The Field List window displays the list of fields in the table.

  2. Select a field and then choose the OK button. The Field Caption field is filled in with the field name.

  3. In the Default Value field, enter an appropriate value. In some cases, you may want to use a value that is not a value that is available in the database. In that case, you can select the Skip Relation Check check box, to make it possible to apply data without error.

    Tip

    Since the Default Value field does not have a look up to the corresponding Microsoft Dynamics NAV field options, you copy and paste the value that you want from the related page into the template.

  4. Select the Mandatory check box. The check box is informational only. It tells you that information must be entered in the field by the user, but no business logic is enforced. For example, you cannot invoice and post an order if posting groups have not been set up. Since posting groups are required, you can select the Mandatory check box for those fields.

  5. In the Reference field, enter information about the field as needed.

  6. Choose the OK button

Export to a template in Excel

You can create an Excel workbook to serve as a template that is based on the structure of an existing database table quickly. You can then use the template to gather together customer data in a consistent format for later import into Microsoft Dynamics NAV.

To export to a template

  1. Open the configuration worksheet.

  2. Add a table to the list, or select an existing table.

  3. Define the fields from the table that you want to include in the template. For more information, see How to: Manage Company Configuration in a Worksheet.

  4. On the Home tab, in the Excel group, choose Export to Template.

  5. Name and save the .xlsx file. The Excel workbook is automatically opened.

You can now enter customer data in the Excel worksheet. If you have exported multiple tables, each table will be on its own worksheet. Save the workbook before you continue with the next procedure.

Note

You may encounter the following error when you run an English version of Excel, but have your regional settings configured for a non-English language: Old format or invalid type library. To fix this error, make sure that the language pack for the non-English language is installed. For more information, see the Knowledge Base article 320369: “Old format or invalid type library” error when automating Excel.

To import from a template

  1. Open the configuration worksheet.

  2. On the Home tab, in the Excel group, choose Import from Template.

  3. Navigate to the template worksheet that you have created. Choose Open.

  4. To add the customer data that you have collected to the database, on the Home tab, in the Process group, choose Apply Data.

When you apply data from a template in Excel to a table that also has a configuration template linked to it in the configuration package, the default field values from the configuration template are also applied.

Any record whose data is applied in this manner is complete, because it consists of data entered by a user in Excel, plus the default values specified by the configuration template.

See Also

Tasks

How to: Create a Record from a Configuration Template

Concepts

Use Templates to Prepare Customer Data for Migration