Invalid or Disabled Suitelet Error

This was crazy! After a sandbox refresh, I made a single line change to an array constant. Suddenly my Suitelet began throwing an “Invalid or disabled Suitelet” error. Prior to this change, it ran fine.

I contacted NetSuite for help, but several days later my case auto-closed with no resolution. Here is the fix.

The Suitelet included 2 library files. Suitelets and their included libraries must be the same version of SuiteScript. What I discovered after much trial and error, is that in the past, libraries did not require the @NApiVersion directive. Apparently, now they do! No other changes were required. I added lines 1-3 to the top of the library that was missing the directive.

Just in case you are curious, this was the array constant I changed just before uploading the file to sandbox. I modified the last entry to swap it from “Ignored” to “Group S/N”. That broke the Suitelet. It seemed impossible that my change was the issue. It turns out it was a ticking time bomb. It ran, but only until the script file changed.

Leave a comment