Discussions
getSublistText is throwing error in userevent beforeSubmit (SS 2.0)
I have created a userevent in SuiteSript 2.0. In the beforeSubmit event, I got the workorder object from context. Now when I call getSublistText function on workorder object, it throws following exception:
Exception by NetSuite:
{
"type": "error.SuiteScriptError",
"name": "SSS_INVALID_API_USAGE",
"message": "Invalid API usage. You must use getSublistValue to return the value set with setSublistValue. ",
"stack": [
"anonymous(N/recordService)",
"beforeSubmit(SuiteBundles/Bundle 118273/SES - TodoFut/userevent/f3_workorder_userevent.js:38)"
],
"cause": {
"type": "internal error",
"code": "SSS_INVALID_API_USAGE",
"details": "Invalid API usage. You must use getSublistValue to return the value set with setSublistValue. ",
"userEvent": "beforesubmit",
"stackTrace": [
"anonymous(N/recordService)",