Hello All, I am working on a suitelet and I am get...
# suitescript
s
Hello All, I am working on a suitelet and I am getting an error 'TypeError: Cannot call method "split" of undefined' even on the suitelet script mentioned below. Can anyone tell me what I am doing wrong?
/**
 
*@NApiVersion 2.x
 
*@NScriptType Suitelet
 
*/
define([], function() {
    
function onRequest(context) {
        
context.response.write('Hello World')
    
}
    
return {
        
onRequest: onRequest
    
}
});
b
script file content looks fine
try deleting the script record and then recreate it
n
This error has been popping up quite often recently and apparently it's a known NS issue. Although nobody seems to state what that "know issue" is apart from the error message. I saw it myself about 3 weeks ago but unfortunately do not recall what "fixed it" and I've written a couple dozen scripts since then so not likely to recall I'm afraid. I suggest you try searching this channel to see what others said.
message has been deleted
s
@Nelli yeah I also faced the same error a while back. At that time the issue was that I was attaching a custom module with a script and was not giving the correct path. currently though I am not sure what would be the problem as the suitelet is almost empty without any module attached to it.
@battk That worked Thanks alot. This seems to be a very random error I think.
👍 1