Create customer statement PDF for selected subsidiary with SuiteScript 2.0

Hi All,


I am trying to create PDF of customer statement for selected subsidiary using SuiteScript 2.0.
However it seems render.statement(options) does not have option for subsidiary.


[SuiteScript 1.0]
nlapiPrintRecord(type, id, mode, properties)
properties can include “subsidiary”


[SuiteScript 2.0]
there is no option for subsidiary


I found SuiteAnswer Id: 80239, but the example does not work.

Does anyone know how to select subsidiary for render.statement() ?


Thank you for your help in advance. ūüôā


Rookie Asked on February 24, 2021 in SuiteScript.
Add Comment
1 Answer(s)

The code for render.statement looks like:

function renderStatement(options) {
 var printProperties = new Object();
 if (options.formId) {
  printProperties["formnumber"] = options.formId;
 if (options.inCustLocale) {
  printProperties["incustlocale"] = options.inCustLocale;
 if (options.openTransactionsOnly) {
  printProperties["openonly"] = options.openTransactionsOnly;
 if (options.consolidateStatements) {
  printProperties["consolstatement"] = options.consolidateStatements;
 if (options.statementDate) {
  printProperties["statementdate"] = options.statementDate;
 if (options.startDate) {
  printProperties["start_date"] = options.startDate;
  printProperties["startdate"] = options.startDate;
 var pdfFile = invoker(renderApi, "nlapiPrintRecord", [
  options.printMode || null,
 return Object.freeze(file.wrap(pdfFile));

There are no options for subsidiary. Theoretically you can probably monkey patch the Object constructor, but thats pretty desperate. Best option would probably be a support case.

Advanced Answered on February 25, 2021.

Thanks battk!

I will create PDF generation part using SuiteScript 1.0.

on March 1, 2021.

Hi Battk and Kenji,

Please let me know where did you this code ?

I have problem when I want to print and download customer indivisual statements via API.

Could you know how to do that ?


on November 21, 2023.
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   Become a Sponsor   Become a Sponsor