I am getting this error: {“type”:”error.SuiteScriptError”,”name”:”WRONG_PAR AMETER_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.
This is a cached copy. Click here to see the original post.