action.skip

How to overwrite specific template fields?

← PDF and Email FAQ

Generally, template details are a means to override specific fields of a template in order to cover specific use cases.

Default template detail fields

By default, template details include the following fields and, hence, can overwrite the corresponding template fields:

Field Type Notes
Balance Columns Text (255)
Balance Types Long Text Area (32768)
Counter Text (255)
Custom CSS Long Text Area (32768)
Display Type Text (255)
Email Body Long Text Area (32768) You must use either Email Body or Email HTML Body in both the template and its associated template details for the overwrite mechanism to work.
Email HTML Body Html (32768) You must use either Email Body or Email HTML Body in both the template and its associated template details for the overwrite mechanism to work.
Email Subject Text (255)
Info Left Long Text Area (32768)
Info Right Long Text Area (32768)
Override Labels Long Text Area (16384)
PDF Name Text (255) The allowed characters include the alphanumeric characters a-z A-Z 0-9 as well as the underscore _ and hyphen - characters.
Table Columns Text (255)
Text 1 Long Text Area (32768)
Text 2 Long Text Area (32768)
Text 3 Long Text Area (32768)

Certain business use cases require to overwrite or hide template fields that are not covered with template details. To this end, you add new custom fields to the template detail that correspond to the template fields. They must have the same API name – so the template field FieldName__c is FieldName__c on the template detail.

Overwriting Template Field

Assume, for example, you need a dedicated footer for cancellations. The corresponding template field is Footer__c, its data type is Long Text Area. Here is what you do:

  1. Navigate to the fields list of the Template Detail object.
  2. Create the following new field.

    Field Label API Name Data Type
    Footer Footer Text Area (Long)

    This makes the Footer field available on template details, allowing for overriding the template footer.

  3. Open the invoice template to be edited.

  4. In the Template Details section, click Edit in the row of the Cancelation template detail.
  5. In the Footer field, specify the information as necessary.
  6. Click Save.

    This overwrites the template footer when producing cancellations.

Info

Your template details for other use cases, like credits or statements, now also include the Footer field. But as long as you leave it empty, JustOn uses the value as defined in the parent template.

Hiding Template Field

If a template detail field is empty, JustOn uses the value as defined in the parent template. The value n/a in a template detail field will produce an empty (and therefore "invisible") field without falling back to the value set in the template.

Assume you do not want any footer to be printed on PDF files for account statements:

  1. Open the invoice template to be edited.
  2. In the Template Details section, click Edit in the row of the Account Statement template detail.
  3. In the Footer field, enter n/a.
  4. Click Save.

    This produces an empty, and therefore "invisible", Footer field.