Scenario
The error is received once the Save or Preview button is clicked when pdfset element is used in an Advanced PDF/HTML Template and a link for the external PDF file is included in the <pdf> tag.
To resolve, the link needs to be reviewed for any ampersand symbols (&). This is because encoded named entity (&) needs to be used instead of plain “&” in the link so that the external PDF file is generated correctly. Once this is performed, the template shall be saved or previewed successfully.
Solution
- Navigate to Customization > Forms > Advanced PDF/HTML Templates
- Preferred custom Advanced PDF/HTML Template: Click Edit
- Top right corner: Toggle Source Code
- Source Code:
- Locate the link in <pdf> tag example:
<pdf src=“https://AccountID.app.netsuite.com/core/media/media.nl?id=1111&c=AccountID&h=4idddf4-54DFrisud67Dsa-t98Dasasueyre2Ff&_xt=.pdf” /></pdfset>
- Replace & with &Example:
<pdf src=“https://AccountID.app.netsuite.com/core/media/media.nl?id=1111&c=AccountID&h=4idddf4-54DFrisud67Dsa-t98Dasasueyre2Ff&_xt=.pdf” /></pdfset>
- Locate the link in <pdf> tag example:
- Click Save