Print Shipping Label with Advanced Standard Template Gives Unexpected Error
Published on
May 31, 2023 at 8:46:41 AM PDT May 31, 2023 at 8:46:41 AM PDTst, May 31, 2023 at 8:46:41 AM PDT
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 toCustomization>Forms>Advanced PDF/HTML Templates
- Standard Shipping Label PDF/HTML Template:ClickCustomize
- Top Right Corner:ToggleSource Code
- Line 47:Find<#if label.refNumber !=0>
- Replace it by<#if label.refNumber?has_content>
- ClickSave
Note:Make sure that the new custom template is marked Preferred.