How can I refer a script in advance pdf
Custom sublist data isn’t coming in advance pdf. If we get that data in script how can we use it in template
Are you happy to generate the PDF from a script?
Yes Chris
I only want to get custom sublist data in pdf
Hi Haris,
In order to generate the PDF from a script, you’ll be using the N/render module.
As well as plenty of other options for sourcing data, there’s a method called addCustomDataSource:
https://netsuite.custhelp.com/app/answers/detail/a_id/49361
This allows you to pass the data to the template and lets you specify what the variable will be named within the template, e.g.
renderer.addCustomDataSource({ format: render.DataSource.OBJECT, alias: 'my_sublist_data', data: my_sublist_object });
With this, you’ll be able to add ${my_sublist_data.column1} to the PDF template.
I hope this helps you in the right direction and I’m very happy to assist with any further questions.
Thanks,
Chris