Saturday, September 15, 2018

Possible cause of intermittent JS_EXCEPTION Error in Suitescript code

 

When troubleshooting Suitescript code and after validating that it is not a coding issue but user is still getting an intermittent JS_EXCEPTION, characters on the javascript file must be checked.

 

It is a common practice for Developers to use multiple text editors and copy-pasting the content from editor to editor to the code file. There are times that copied characters when pasted to the code would still retain its format (e.g. unicode characters).

 

Netsuite as most standard web applications have a charset=UTF-8 declaration as its content. When the charset=UTF-8 is declared, uers have to make sure the bytes transmitted to the browser are actually UTF-8. The web server and browser will not do it for the user in this situation.

 

To resolve the JS_EXCEPTION issue, simply remove the invalid character on the Suitescript file.

 

Another way is open up a blank Notepad file, paste the codes there and re-upload the file.

 

No comments:

Post a Comment