Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MODULE_DOES_NOT_EXIST SuiteScript

I am running into the issue below when trying to edit a CUSTOMER record in NetSuite. The script I have created is very simple.

What could I possibly doing wrong with such a simplistic piece of code?

{"type":"error.SuiteScriptModuleLoaderError","name":"MODULE_DOES_NOT_EXIST","message":"Module does not exist: /SuiteScripts/BillingInfoUpdated.js","stack":[]}

SCRIPT:

define(['N/log'], function (log) {

    /**
     * User Event 2.0 example showing usage of the Submit events
     *
     * @NApiVersion 2.x
     * @NModuleScope SameAccount
     * @NScriptType UserEventScript
     * @appliedtorecord customer
     */
    var exports = {};

    function afterSubmit(scriptContext) {
        log.debug({
            "title": "After Submit",
            "details": "action=" + scriptContext.type
        });
    }

    exports.afterSubmit = afterSubmit;
    return exports;
});
like image 677
Coova Avatar asked Mar 22 '17 19:03

Coova


2 Answers

Nathan Sutherland answer worked for me and it's absolutely fine But I'm writing this answer so new user get that faster and not confused with other names. You need to add .js where the blue arrow points.

On starting while creating script. here

if you forget then edit here

NS

like image 182
Avinash Singh Avatar answered Nov 16 '22 07:11

Avinash Singh


Add .js to the end of the script file name

like image 21
Nathan Sutherland Avatar answered Nov 16 '22 08:11

Nathan Sutherland