Scenario
Print Shipping Label from Item Fulfillment using Standard Shipping Label PDF/HTML Template gives an error:"An unexpected error has occurred. Please click here to notify support and provide your contact information.".
In the Standard Shipping Label PDF/HTML Template, the following code condition on line 47 <#if label.refNumber !=0> expects to evaluate number from the PO # field (id:otherrefnum) on Sales Order. A non-number value on the PO # field displays this unexpected error. Change the condition in order to print Shipping Label with non-number value on the PO # field.
Solution
- Navigate to Customization > Forms > Advanced PDF/HTML Templates
- Standard Shipping Label PDF/HTML Template: Click Customize
- Top Right Corner: Toggle Source Code
- Line 47: Find <#if label.refNumber !=0>
- Replace it by <#if label.refNumber?has_content>
- Click Save
Note: Make sure that the new custom template is marked Preferred.