Print Location Address on the Packing Slip Using Advanced PDF/HTML Template

There are instances wherein companies need to display the Location Address on their Packing Slip PDF printouts depending on the Location selected on the Sales Order.

Solution
  1. Create a Custom Transaction Body Field on the Sales Order
    1. Navigate to Customization > Lists, Records, & Fields Transaction Body Fields > New
    2. Label: Enter Label 
      Example: Location Address
    3. ID: Enter _so_loc_address
    4. Type: Select Free-Form Text
    5. Store Value: Remove Checkmark
    6. Click Sourcing & Filtering
      • Source List: Select Location (Main)
      • Source From: Select Address
    7. Click Save
  2. Create a Custom Transaction Body Field on the Item Fulfillment
    1. Navigate to Customization > Lists, Records, & Fields Transaction Body Fields > New
    2. Label: Enter Label 
      Example: Location Address From Sales Order
    3. ID: Enter _from_so_loc_address
    4. Type: Select Text Area
    5. Store Value: Remove Checkmark
    6. Click Validation & Defaulting
      • Default Value: Enter {‌createdfrom.custbody_so_loc_address}
    7. Click Save
  3. Modify the Advanced PDF/HTML Template
    1. Navigate to Customization > Forms > Advanced PDF/HTML Templates 
    2. Preferred Packing Slip PDF/HTML Template: Click Edit or Customize 
    3. Top right corner: Toggle Source Code 
    4. Look for the prints the Company Address
    5. Change the code to:
      <td style="font-size: 7pt;" align="right"><span class="nameandaddress">${‌record.custbody_from_so_loc_address}</span><br/><br/></td>Copy
    6. Click Save

Leave a comment

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