Advanced PDF/HTML Template > Lock the Printed PDF and use a Custom Field to Store the Password

Scenario

User wants to create a password to be stored and hidden on the Purchase Order record for transaction PDFs using a Custom Transaction Body Field.

Solution

  1. Create a Custom Transaction Body Field
  2. Navigate to Customization > Lists, Records, & Fields > Transaction Body Fields > New
  3. Label: Enter Label (Example: PDF Password)
  4. Type: Select Free-Form Text
  5. Store Value: Enter Checkmark
  6. Click Applies To
  7. Purchase: Enter Checkmark
  8. Click Save
  9. Edit the Advanced PDF Template
  10. Navigate to Customization > Forms > Advanced PDF/HTML Templates
  11. Preferred Purchase Order Transaction PDF Template: Click Edit
  12. Click the Source Code toggle
  13. Immediately under the <head> tag, enter this line: <meta name=”password” value=”${‌record.(internal ID of your Custom Field)}”/>
  14. Click Save
  15. Edit the Purchase Order record that needs to have the password
  16. Navigate to Transactions > Purchases > Enter Purchase Orders > List
  17. Preferred Purchase Order Record: Click Edit
  18. Click Custom
  19. Click PDF Password
  20. Value: Enter the password value (Example: password123)
  21. Click Save
  22. Click the Print icon
  23. The browser should require a password. Enter the password that was set earlier to show the printed PDF.

Note: If the user doesn’t want the Custom Field containing the password to be displayed on the form, customize the form and uncheck the Show checkbox for the Custom Field. The user should still be able to use the password when printing the transaction.

Leave a comment

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