There is a requirement to print the value in the Print on Check As field instead of the value in Customer name. To do this, we need to add an if condition in the source code that will print the Print on Check As field when it has a value in the Customer record. Kindly follow the steps below:
Edit the Advanced PDF/HTML Template
- Navigate to Customization > Forms > Advanced PDF/HTML Templates
- Preferred Advanced PDF Template: Click Edit
- Top Right corner: Click Toggle Switch
- Add the code: <#if check.entity.printoncheckas != ''> <td>${check.entity.printoncheckas}</td><#else> <td>${check.entity}</td></#if>
- Click Save
By doing the steps above, the customer name will be printed if the Print on Check As field is empty, while the template will print the Print On Check as if it has value in the record.
Have any questions about Advanced PDF/HTML Templates? Let us know below!