Error while Parsing XML in the template

Issue

Error: “The entity name must immediately follow the ‘&’ in the entity reference” when trying to print or save an Advanced PDF/HTML Template.

Solution

This usually happens if one of the Company Information or one of the Field Label or values have a special character like ‘&’. Identify first which field label or value has ‘&’ then add a replace built-in Freemarker function (?replace(‘&’,’&’). 

Example: The field or value with ‘&’ is the Billing Address. You may use the below code to eliminate the error: ${record.billaddress@label?replace(‘&’,’&’)}

Leave a comment

Your email address will not be published. Required fields are marked *