Getting: All SuiteScript API Modules are unavailable while executing your define callback. – when saving map/reduce script in NS UI. Any ideas?

I have several map/reduce scripts that work fine. Created them in WebStorm and used SDF to push them up. However, when I try to edit/save one in NS scripting UI, I get the error:

Fail to evaluate script: All SuiteScript API Modules are unavailable while executing your define callback.

Any ideas?

Rookie Asked on January 6, 2020 in SuiteScript.

I don’t think you are going to get more help than what Kevin got when he asked in slack without sharing more of your script. Generally the error occurs when NetSuites evaluates a script file and determines that you are using a netsuite module outside of the define function. This evaluation generally occurs in the ui when you try to create a script or edit a file. As an example something like the code below will trigger the error.

log.debug("i", "shouldn't be here");
define(["N/record"], function(record) {/* whatever entry point stuff here */});
on January 6, 2020.
Add Comment
0 Answer(s)

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.
  • This site made possible by our sponsors:   Tipalti   Celigo   Limebox   Become a Sponsor