Hello all, I have an error I do not understand: i ...
# suitescript
t
Hello all, I have an error I do not understand: i have a MR script that creates SO, and it's working fine in SandBox, but sometimes in Production, I receive that unexpected error:
{
"type":"error.SuiteScriptError",
"name":"UNEXPECTED_ERROR",
"message":"TypeError: Cannot call method \"substring\" of undefined (NLRecordScripting.scriptInit$lib#13583)",
"stack":[
"Error\n at Object.processFile (/SuiteScripts/SFCC/BB_SFCC_lib.js:968:39)\n at Object.reduce (/SuiteScripts/SFCC/BB_MR_SFCC_ord01.js:217:57)"
],
"cause":{
"type":"internal error",
"code":"UNEXPECTED_ERROR",
"details":"TypeError: Cannot call method \"substring\" of undefined (NLRecordScripting.scriptInit$lib#13583)",
"userEvent":null,
"stackTrace":[
"Error\n at Object.processFile (/SuiteScripts/SFCC/BB_SFCC_lib.js:968:39)\n at Object.reduce (/SuiteScripts/SFCC/BB_MR_SFCC_ord01.js:217:57)"
],
"notifyOff":false
},
"id":"",
"notifyOff":false,
"userFacing":true
}
I do not understand the
NLRecordScripting.scriptInit$lib#13583
reference. What is it? I have done a search on all the scripts but I do not see it. It looks like it's coming from the Source Code of NetSuite but I'm not sure. Thanks in advance.
b
probably internal netsuite code
my guess is that netsuite is expecting some parameter to be a string instead of undefined
you may want to try it in suitescript 2 to see if you have any better luck
t
hello, thanks. We have solved the issue, the SO was created on the wrong customer. But that error is really weird. It's super complicated to debug.