Check out Oracle NetSuite upcoming events and conferences here
Now is the time to ask your NetSuite-savvy friends and colleagues to join the NetSuite Support Community! Refer now! Click here to watch and learn more!
Update your Profile with your Support type to get your Support Type badge.
Don't miss out on our Question of the week! You only have until tomorrow, April 18, 2024, 2 PM EST to comment your answers and earn rewards! Click here for more details.
Expand your NetSuite knowledge by joining our Ask A Guru Live sessions. RSVP on this event now.
Community Poll: What sort of content would you like to see more of?

How to Render Module - mergeEmail function erroring

edited Jun 20, 2023 8:22PM in SuiteCloud / Customization 3 comments

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.


Howdy, Stranger!

Log In

To view full details, sign in.


Don't have an account? Click here to get started!


Community Whiz

Quarter 1 (Jan-Mar 2024)

This Week's Leaders

This Month's Leaders

All Time Leaders