1.8

Table Of Contents
'http://localhost:8080/pod/v1/deliverynotes/{8FCEC8BC-
72E8-486B-A206-516BF10E21F6}'.
Of course, you can also use dynamic calls such as
'file:///c:/clientfiles/' + record.fields.client_id +
'/invoices/' + record.fields.invoice_number + '.pdf'.
l
Add the title attribute to specify a custom attachment name. For example:
results.append("<link rel='related' href='images/{8FCEC8BC-
72E8-486B-A206-516BF10E21F6}.pdf'
title='INV1375461.pdf'>");
Examples
The following script attaches a PDF file named letter-CU00048376.pdf to each generated
email. The PDF file is located in the Images folder on the Resources panel.
results.append("<link rel='related' href='images/letter-
CU00048376.pdf'>");
If that same file would be located on the C: drive, the script should refer to it as follows:
href='file:///C:/letter-CU00048376.pdf'.
The link doesn't have to be static; you could use data from the record set to build the link, for
example:
var customerID = record.fields.ID;
results.append('<link rel="related" href="images/letter-' +
customerID + '.pdf">');
Renaming attachments
External files that are sent as attachments can be renamed via the script that attaches them to
the email, by putting their intended name in the title attribute. For example:
results.append("<link rel='related' href='images/{8FCEC8BC-72E8-486B-A206-
516BF10E21F6}.pdf' title='INV1375461.pdf'>");
Print sections that are attached to an email can be renamed via a Control Script; see "Parts:
splitting and renaming email attachments" on page287.
Page 127