screnshaw
01/20/2022, 9:42 PMThere was a problem when uploading the file. Details: Fail to evaluate script: {"type":"error.SuiteScriptError","name":"SUITESCRIPT_API_UNAVAILABLE_IN_DEFINE","message":"All SuiteScript API Modules are unavailable while executing your define callback.","stack":["Error\n at getFileId (/SuiteScripts/AccentDecor/Libs/Config/fileConfig.js:7:19)\n at /SuiteScripts/AccentDecor/Libs/Config/fileConfig.js:22:29"],"cause":{"type":"internal error","code":"SUITESCRIPT_API_UNAVAILABLE_IN_DEFINE","details":"All SuiteScript API Modules are unavailable while executing your define callback.","userEvent":null,"stackTrace":["Error\n at getFileId (/SuiteScripts/AccentDecor/Libs/Config/fileConfig.js:7:19)\n at /SuiteScripts/AccentDecor/Libs/Config/fileConfig.js:22:29"],"notifyOff":false},"id":"","notifyOff":false,"userFacing":true}.
However, if I include runtime in the mail file, and return runtime.envType it works.
Either scenario works if I have both js files in sandbox, it's just SDF Webstorm is messing up for some reason.
It is happening when doing the below. I would like to keep this as it makes it easier to type when reused.
return {
SCRIPT_SAVED_FILES: getFileId('SCRIPT_SAVED_FILES')
};
battk
01/21/2022, 1:54 AMbattk
01/21/2022, 1:55 AMbattk
01/21/2022, 1:56 AMbattk
01/21/2022, 1:57 AMbattk
01/21/2022, 1:57 AMscrenshaw
01/21/2022, 2:50 AMbattk
01/21/2022, 2:57 AMscrenshaw
01/21/2022, 3:00 AM