Error parsing XML: the entity name must immediately follow the ‘&’ in the entity reference

Solution

Firstly, we need to check, where we use the  ‘&’ in the record . It may be billing address, shipping address, item name and Lot number in the inventory details . After that using the below mentioned code for replace the ‘&’

replace(/&/gi, ‘&’) || “”;

For Example:

var get_des = create_invoice.getSublistText({
    sublistId: ‘item’,
    fieldId: ‘item’,
    line: p
}).replace(/&/gi, ‘&’) || “”;

Leave a comment

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