Discussions
SuiteWorld is the largest annual gathering of the NetSuite community! It will be held in Las Vegas on October 6-9, 2025. Our customers and partners look forward to SuiteWorld every year as a place to hear the latest from NetSuite, get hands-on learning, and connect with each other. Register now!
We apologize for any inconvenience this may cause and appreciate your understanding.
How to Render Module - mergeEmail function erroring
I am getting this error: {"type":"error.SuiteScriptError","name":"WRONG_PARAMETER_TYPE","message":"Wrong parameter type: options.entity is expected as object. " when attempting to use the render.mergeEmail() function.
My code:
var email_merger = render.mergeEmail({
templateId : 13,
entity : {
type : params.type,
id : params.id
},
customRecord : {
type : 'customrecordnickname',
id : customer.getValue({ fieldId: 'custentitymktreconinq' })
}
});
I am not sure why I am getting this error as entity is being given an object.