Modules

filter

 

Objects/Functions

module (N/render)

SuiteScript 2.0

render.mergeEmail(options)

{render}.mergeEmail({templateId: {number*},entity: {RecordRef*},recipient: {RecordRef*},customRecord: {RecordRef*},supportCaseId: {number*},transactionId: ${7:number*}})

N/render Module
render.mergeEmail()
Method Description: Creates a render.EmailMergeResult object for a mail merge with an existing scriptable email template
Returns: render.EmailMergeResult
Supported Script Types: Server-side scripts For more information, see SuiteScript 2.0 Script Types.
Governance: None
Module: N/render Module
Since: 2015.2
Search NetSuite - https://system.netsuite.com/app/help/helpcenter.nl?search=render.mergeEmail(options)

Example:

// Code Example 1
//Add additional code
//...
var myMergeResult = render.mergeEmail({
templateId: 1234,
entity: {
type: 'employee',
id: 623
},
recipient: {
type: 'lead',
id: 543
},
supportCaseId: 674,
transactionId: 8987,
customRecord: {
type: 'custrecord_rewardpoints',
id: 5423
}
});
//...
//Add additional code

//SOURCE: https://system.netsuite.com/app/help/helpcenter.nl?fid=section_454332824706.html