ail to evaluate script: {“type”:”error.SuiteScriptModuleLoaderError”,”name”:”MODULE_DOES_NOT_EXIST”,”message”:”Module does not exist: /lodash.min.jso

/**
 * @NScriptType UserEventScript
 * @NApiVersion 2.0
 */
define([‘N/file’, ‘N/render’, ‘N/ui/serverWidget’, ‘N/search’, ‘SuiteScripts/lodash.min’],
    /**
     * @param {file} file
     * @param {render} render
     * @param {search} search
     * @param {serverWidget} serverWidget
     */
    function(file, render, serverWidget, search, _) {
        return {
            beforeLoad: function(context) {
                var item = context.newRecord;
                var form = context.form;
                var managerTemplate = file.load({
                    id: ‘SuiteScripts/template/photomanager.html’
                });
                var managerFld = form.addField({
                    id: ‘custpage_sdr_photo_manager’,
                    type: serverWidget.FieldType.INLINEHTML,
                    label: ‘Photo Selection’,
                    container: ‘store’
                });
                form.insertField({
                    field: managerFld,
                    nextfield: ‘storedisplayimage’
                });
                var compiled = _.template(managerTemplate.getContents());
                managerFld.defaultValue = compiled();
            }
        };
    });
Rookie Asked on July 2, 2022 in SuiteScript.
Add Comment
1 Answer(s)

If your file is in the SuiteScipts directory.
You would include like this. ‘/lodash.min’. You don’t include SuiteScripts since it is the root directory.

Rookie Answered on July 2, 2022.

Fail to evaluate script: {“type”:”error.SuiteScriptModuleLoaderError”,”name”:”MODULE_DOES_NOT_EXIST”,”message”:”Module does not exist: /lodash.min.js”,”stack”:[]}

on July 2, 2022.

when i create a script file getting error

on July 2, 2022.

upload it to suitescript folder and then follow the path.

The normal path would be something starts with “/SuiteScripts/”

on July 3, 2022.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.
  • This site made possible by our sponsors:   Tipalti   Celigo   Limebox   Become a Sponsor   Become a Sponsor