I've created a js file, filled with the logic for CS script and uploaded it to the file cabinet. Afterwards I want to create a script record and select the file, but get the following error when trying to save the script object:
Error Fail to evaluate script: {"type":"error.SuiteScriptModuleLoaderError","name":"{stack=[Ljava.lang.Object;@62fae4dc, toJSON=org.mozilla.javascript.InterpretedFunction@2d7dfa04, name=MODULE_DOES_NOT_EXIST, toString=org.mozilla.javascript.InterpretedFunction@1a1478db, id=, message=Module does not exist: N/render.js, TYPE=error.SuiteScriptModuleLoaderError}","message":"","stack":[]}
My CS file:
define(['N/render', 'N/currentRecord'],
/**
* @param {render} render
* @param {currentRecord} currentRecord
*/
function(render, currentRecord) {
function download_file(scriptContext)
{
var renderer = render.create();
//other logic
}
return {
download_file : download_file,
};
});
Did anyone experience this before and know what causes this?