Displaying Child Record Data on a Parent Custom Record PDF

To display child record information within the printed PDF of a parent custom record, follow this approach using SuiteScript and Advanced PDF/HTML templates:

Steps to Implement

  1. Deploy a User Event Script on the Parent Custom Record
  2. Within the beforeLoad function, ensure the script executes only when the context is CONTEXT.PRINT.
  3. Generate a Virtual Sublist with Child Record Data
  4. Inside the script, dynamically create a virtual (non-persistent) sublist using form.addSublist(…). Then, fetch related child record entries using search and set the values to the sublist.
  5. Access the Virtual Sublist in the PDF Template
  6. In the Advanced PDF/HTML template linked to the parent record, loop through the virtual sublist (<#list record.line as line>) and display the values in PDF. Use the sublist fields to present child record data in the desired format.

Leave a comment

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