2020.2

Table Of Contents
Dynamic attachment scripts add a <link> element to the <head> of an Email section. The title
attribute of that element specifies the attachment name that will show up in the email.
Take a look at the last line of the script:
results.append(query("<link rel=related>").attr("title", result.split('/').pop()).attr("href", result));
To give the attachment another name, you have to replace the bold part of the code by that new
name. For example:
results.append(query("<link rel=related>").attr("title", "Invoice.pdf").attr("href", result));
Of course, you can also use data field values here, for example: results.append(query("<link
rel=related>").attr("title", record.fields.invoice_number + ".pdf").attr("href", result));
Note that the Wizard can no longer be used once you have edited and saved the script.
Note
For attachment names, it is recommended to use only US-ASCII characters. Other
characters may not be supported by all email servers and clients.
Content elements
Once you have created a template, it can be filled with all kinds of elements. All types of
elements are listed on this page.
There are several ways to insert elements, see "Inserting an element" on page193.
Each element can have an IDand a class, as well as a number of other properties, depending
on the element's type. When an element is selected, its properties can be changed; see
"Selecting an element" on page194, "Attributes" on page191 and "Styling and formatting an
element" on page195.
ID's and classes are particularly useful with regard to variable data (see "Personalizing
content" on page329) and styling (see "Styling templates with CSS files" on page287).
When you add elements, such as text, images or a table, to the content of a template, you are
actually constructing an HTML file. It is possible to edit the source of the HTML file directly in
the Designer; see "Editing HTML" on page191.
Element types
The following types of content can be added to the content of a template:
Page 189