niso
niso

Reputation: 107

How to use custom record inside the advanced pdf/html template in Netsuite?

In netsuite I'm customizing advanced pdf/html template for the invoice forms. Inside in it I could call custbody fields that related to invoice record. But I want to call custom records. Is there any way to use an independent custom records in the advanced pdf template. Thanks in advance.

Upvotes: 0

Views: 1927

Answers (1)

bknights
bknights

Reputation: 15462

If you are using the SS2.0 template renderer you load the record and add it with the addRecord method:

    var customRec = record.load({
        type: 'customrecord_my_custom',
        id: id
    });
    renderer.addRecord({
        templateName: 'record', // this value is whatever key your freemarker template uses.
        record: customRec 
    });

Upvotes: 3

Related Questions