Add master template fields

  • 6 Min.

"Every now and then I want to add a specific piece of data to an invoice, but I can't find a suitable field for it in the master template. I would be really handy to be able to add custom fields, so that I can automate even more of the data capture before registration."

Ester, Accounts Payable at Cronus

The default Document Capture master templates already include fields for a wide range of variations in documents. However, because each business is unique, you can add or remove fields to make the master templates suit your needs perfectly.

Scenario

Ester needs to add a header field to a source template, but this is not available in the master template.
Ester needs to:

  • Add a field to the master template.
  • Adjust the configuration of the new master template field for handling all vendors.

Create fields in a master template

Because master templates work across a document category, you access the configurations for master template fields through the Document Category page.

  • Select the line with relevant document category and use the Edit action.
  • On the Document Category page, on the Templates FastTab, select the line with the relevant master template and use the Edit action.
  • On the Fields FastTab, either:
    • Use the New action to start creating a field from scratch from a new template field card.
    • Use the Create new Template Field action to launch an assisted setup guide for some of the more commonly used types of template fields. After finishing the guide, you can open the template field card to make further changes. Select the relevant line from the Fields FastTab, then use the Edit action.

Choose from common field configurations

The template field card includes a wide range of options. Some of the most used fields and options are described below.

Description
Companies often create a large number of templates to deal with variations in the document formats and layouts. The Description field is very useful for helping you choose the most suitable template to apply to each incoming document, because this text is shown directly in the document journal's template column.

Field type
In the assisted setup guide, your first field specifies if the field is a header field or a line field. Then, select from five common purposes for adding a master template field:

  • To apply a calculation to an amount from another field.
  • To include a value from a dimension.
  • To include a value as a lookup from another table in Business Central.
  • To register a cost to a specific G/L account.
  • To capture other invoice information in a text, date, number, or Boolean format.

Required
If you select this option, the field will be required for documents that have the related field on their template. If a value is not recognized from the document, or entered manually, an error message appears in the document journal and document card.

Rules
You can add rules to a field, based on regular expressions. You can use rules to specify a correct format and reject values that do not match this rule. For example, you could use a rule to exclude item number fields that start with ‘POS’. If you enable the Required option on a line field, the whole line relies on the field meeting the rule – otherwise the line will be skipped.

Formula
You can use a formula in a field to perform a calculation or combination on other field values. For example, you could combine the values from an item number and a description into a second description field.

Transfer Value to …
Use these options to transfer the value of this field to a specific field in either the purchase header or purchase lines.

Insert in new templates
If you select this option, the field is added to any future source templates created from the master template. If you do not choose this option, you can still manually add the master template field to a source template from the document journal or document card.

Hinweis

Another unit in this learning path covers how to add or remove source template fields from the master template.

Copy field to all templates

After you configure a template field card and return to the template card, you can use the Copy Field action. This action will be copied to all source templates that have already been created from the master template. This saves a lot of manual work in some cases.

However, note that:

  • Template fields can be removed in bulk from source templates, but only when deleting the master template field. If the field has been used by a source template to capture a value, it cannot be part of the bulk deletion.
  • Changes to master template fields cannot be updated in bulk in source templates that already use the field.

Therefore, it’s recommended that you carefully trial out new template fields as optional and manually copy master template fields to source templates to begin with. When you are certain that the configuration is correct, you can return to the master template card and use the Copy Field action if needed.

More resources

Check your knowledge

      1

      Match each template field option to the correct description.

      A
      Transfer Value to…
      B
      Rules
      C
      Formula
      D
      Required