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

Beginner Asked on December 11, 2020 in How To's.
Add Comment
2 Answer(s)

Are you happy to generate the PDF from a script?

Intermediate Answered on December 14, 2020.

Yes Chris

on December 14, 2020.

I only want to get custom sublist data in pdf

on December 14, 2020.
Add Comment

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

Intermediate Answered on December 15, 2020.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.
  • This site made possible by our sponsors:   Tipalti   Celigo   Limebox   Become a Sponsor