Render a Transaction Record Into an HTML Page

The following sample shows how to render a transaction record into an HTML page.

Note:

This sample script uses the require function so that you can copy it into the SuiteScript Debugger and test it. You must use the define function in an entry point script (the script you attach to a script record and deploy). For more information, see SuiteScript 2.x Script Basics and SuiteScript 2.x Script Types.

Note:

The entityId value in this sample is a placeholder. Before using this sample, replace the placeholder values with valid values from your NetSuite account.

          /**
 * @NApiVersion 2.x
 */

require(['N/render'],
    function(render) {
        function renderTransactionToHtml() {
            var transactionFile = render.transaction({
            entityId: 23,
            printMode: render.PrintMode.HTML
            });
        }
        renderTransactionToHtml();
    }); 

        

General Notices