Error: Wrong parameter type: expected as boolean.

{"type":"error.SuiteScriptError","name":"WRONG_PARAMETER_TYPE","message":"Wrong parameter type: options.openTransactionsOnly is expected as boolean. ","stack":["Error"," at Object.onRequest (/SuiteScripts),"cause":{"name":"WRONG_PARAMETER_TYPE","message":"Wrong parameter type: options.openTransactionsOnly is expected as boolean. "},"id":"","notifyOff":false,"userFacing":true}

Reason:

Netsuite will only accept the boolean in the form of ‘TRUE’ or ‘FALSE’

So before using the variable convert it to Boolean type.

eg:

consolidateStatements:Boolean(scriptContext.request.parameters.custrecord_jj_stmnt),
openTransactionsOnly:Boolean(scriptContext.request.parameters.custrecord_jj_opentrnsn),

Leave a comment

Your email address will not be published. Required fields are marked *