Reputation: 413
I am trying to run this suitescript 2.0 user event script but it always throws an error {"type":"error.SuiteScriptModuleLoaderError","name":"MODULE_DOES_NOT_EXIST","message":"Module does not exist: /SuiteScripts/Usr event 2.0.js","stack":[]}
the script code is
/**
*@NApiVersion 2.x
*@NScriptType UserEventScript
*/
define(['N/record'],
function(record)
{
function afterSubmit(context)
{context.type == context.UserEventType.CREATE
var customerRecord = context.newRecord;
var comm = customerRecord.getValue('comments')
try {
log.debug('Comments', 'Value: ' + comm);
} catch (e){
log.error(e.name);
}
}return {
afterSubmit: afterSubmit
};
});
Upvotes: 4
Views: 1882
Reputation: 59
Just add .js at the end of your suitescript name. As i observed multiple times.
Upvotes: 2
Reputation: 413
The issue was that i had not added .js extension to the script file. but now it is working after creating a new script adding the extension.
Upvotes: 2