render.transaction(options)
Method Description |
Creates a PDF or HTML object of a transaction.
Note:
File size is limited to 10MB. If the Advanced PDF/HTML Templates feature is enabled, you can associate an advanced template with the custom form saved for a transaction. The advanced template is used to format the printed transaction. For details about this feature, see Advanced PDF/HTML Templates |
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 |
|
Since |
2015.2 |
Parameters
The options
parameter is a JavaScript object.
Parameter |
Type |
Required / Optional |
Description |
---|---|---|---|
|
number |
required |
The internal ID of the transaction to print. |
|
enum |
optional |
The print output type. Set using the render.PrintMode enum. By default, uses the company/user preference for print output. |
|
number |
optional |
The transaction form number. |
|
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. |
Syntax
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.transaction({
entityId: 23,
printMode: render.PrintMode.HTML,
inCustLocale: true
});
...
//Add additional code