The Priority of Item pricing population in Sales order

In NetSuite, the priority for item pricing population from the client record is as follows: Line-level item pricing takes precedence and has the highest priority. If line-level item pricing is not available, then the group pricing will be populated. If neither line-level item pricing nor group pricing are available, the body level price level will… Continue reading The Priority of Item pricing population in Sales order

Create email template in the script.

function mergeTemplate(recordId, tranId, pdfFile, totalAmount, department) {            try {                let senderId = 4;                let recipient=5;                let approveURL = ‘https://4449540-sb1.extforms.netsuite.com/app/site/hosting/scriptlet.nl?script=1020&deploy=1&compid=4449540_SB1&h=c9cbe8c1bd3b61843636’ + ‘&po_id=’ + recordId + ‘&btn=true’;         … Continue reading Create email template in the script.

Update landed cost in item receipt based on CSV data using Map/Reduce Script.

The csv file should like shown as below. The following code is given in getInputData(). The internal id of the csv file is given as id in file.load.   let file1 = file.load({id: 1116983});              let fileContents = file1.getContents();              log.debug(“contents”,fileContents)         … Continue reading Update landed cost in item receipt based on CSV data using Map/Reduce Script.

Create Item Fulfillment from Sales Order using RESTlet

First fetch the particular sales order by internal ID which is passed by POSTMAN API as parameter. The following code is used. let salesOrderID = requestBody.salesorderid;            let salesOrderRec = record.load({                type : record.Type.SALES_ORDER,                id : salesOrderID, … Continue reading Create Item Fulfillment from Sales Order using RESTlet

Add Warning Message in Sales Order using UserEvent Script

If you want to show warning message in sales order when selecting a particular checkbox, use the following code in UserEvent Script. Must include the module N/ui/message and give newRec type is sales order. let newRec=scriptContext.newRecord. let cusField=newRec.getValue({fieldId:’fieldid’});              if(cusField)   {              let myMsg =… Continue reading Add Warning Message in Sales Order using UserEvent Script