render.statement(options)

Note:

The content in this help topic pertains to SuiteScript 2.0.

Method Description

Creates a PDF or HTML object of a statement.

Returns

file.File that contains a PDF or HTML document

Supported Script Types

Server scripts

For more information, see SuiteScript 2.x Script Types.

Governance

10 units

Module

N/render Module

Since

2015.2

Parameters
Note:

The options parameter is a JavaScript object.

Parameter

Type

Required / Optional

Description

options.consolidateStatements

boolean

optional

Flag to convert all amount values to the base currency.

options.entityId

number

required

The internal ID of the statement to print.

options.formId

number

optional

The internal ID of the form to use to print the statement.

options.inCustLocale

boolean

optional

Applies when advanced templates are used. Prints the document in the customer's locale.

If basic printing is used, this parameter is ignored and the transaction form is printed in the customer's locale.

options.openTransactionsOnly

boolean

optional

Flag to include only open transactions.

options.printMode

string

optional

The print output type. Set using the render.PrintMode enum.

By default, uses the company/user preference for print output.

options.startDate

Date

optional

Date of the oldest transaction to appear on the statement.

options.statementDate

Date

optional

The statement date.

options.subsidiaryId

Integer

optional

Id of the subsidiary.

Note:

This parameter only works for advance printing.

Syntax
Important:

The following code sample shows the syntax for this member. It is not a functional example. For a complete script example, see N/render Module Script Samples.

          //Add additional code
...
var transactionFile = render.statement({
    entityId: 23,
    printMode: render.PrintMode.HTML,
    inCustLocale: true
    });
...
//Add additional code 

        

Related Topics

N/render Module
SuiteScript 2.x Modules
SuiteScript 2.x

General Notices