Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

suitescript 2.0 module does not exist error user event script

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 }; });

like image 501
Saurabh More Avatar asked Oct 18 '25 14:10

Saurabh More


2 Answers

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.

like image 166
Saurabh More Avatar answered Oct 22 '25 06:10

Saurabh More


Just add .js at the end of your suitescript name. As i observed multiple times.

like image 33
Bebeto Avatar answered Oct 22 '25 05:10

Bebeto



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!