English 中文(简体)
NetSuite Scripting 2.X - Upload Script File - UNEXPECTED_ERROR
原标题:

I am trying to upload a .js file (my suite script) on to NetSuite but am getting the following error.

Fail to evaluate script: {"type":"error.SuiteScriptModuleLoaderError","name":"UNEXPECTED_ERROR","message":"missing ; before statement (SS_SCRIPT_FOR_METADATA#15)","stack":[]}

enter image description here

The Script in question:

/**
 * @NApiVersion 2.x
 * @NScriptType UserEventScript
 */

    define([  N/record  ],function(record) {
        function afterSubmit(context) {
            
            // Load the record.
            var rec = record.load({
                type: record.Type.INVENTORY_ITEM,
                id: 4918
            });
    
            let pricing_group = rec.getValue({
                fieldId:  pricinggroup 
            });
    
            if (part_group ==   ) return;
    
            let current_desc = rec.getValue({
                fieldId:  salesdescription 
            });
    
            rec.setValue({
                fieldId:  salesdescription ,
                value: pricing_group +   |   + current_desc,
                ignoreFieldChange: true,
                forceSyncSourcing: true
            });
     
            // Save the record.
            try {
                var recId = rec.save();
    
                log.debug({
                    title:  Record updated successfully ,
                    details:  Id:   + recId
                });
    
            } catch (e) {
                    log.error({
                        title: e.name,
                        details: e.message
                    });
            }
        }
        return {
            afterSubmit: afterSubmit
        };
    });

The syntax is correct running it on a syntax validator so I m not sure where ; is missing.

问题回答

暂无回答




相关问题
How to create a shopping cart(Ecommerce site) using NetSuite

I am new to NetSuite. I don t know anything about the NetSuite. I want to create a new Shoppping cart(Ecommerce site) in the NetSuite. I am not able to find the steps so that I can create a new ...

invalid argument IE7 javascript line number changes

This is the test page: http://www.onebagoneearth.com/ OBOEKindBag (spaces between the page name and domain because I don t want the URL indexed as such) If you click on one of the thumbnails, or ...

热门标签