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
Category: Suite scripts samples
All the samples related to suite scripts.
How to create a search to find out the overdue Invoice information till the previous month.
Restriction based on Project Allocation record
Restriction based on Project Allocation record
RX Status Change in Auto-Ship
Map reduce script powered by saved search, to set RX Status in line record based on date range set.
Show a popup window to add the reason while changing the Price level field value
Code section to enter the reason when the user changes the price level field value to ‘Custom’. Use the below-mentioned code section in the ‘fielsChanged’ entry point of the client script fieldChanged: function (scriptContext) { try { if ((scriptContext.sublistId == ‘item’) && (scriptContext.fieldId == ‘price’)) { let currentRecord = scriptContext.currentRecord; let currentLine = scriptContext.line let… Continue reading Show a popup window to add the reason while changing the Price level field value
How to create a Project Task record through Suitescript
We can use a ‘Project Task’ record to track the progress of tasks, assign them to employees, and manage them through approval by supervisors/managers.These can be created via Suitescript as well. For this use the ‘N/record’ module and record.create() functionThe required fields for creating a ‘Project Task’ are:company: This is a ‘Project Name’ type field… Continue reading How to create a Project Task record through Suitescript
Fetch the workflow field values related to the record deployed in suite-script using a saved search
Recently I had to fetch the values of workflow fields from within a Suitelet that is triggered by a button action. Workflow fields can be updated based on field value updates in a NetSuite record but there is no direct way of fetching these values in a script. For this, I used a saved search… Continue reading Fetch the workflow field values related to the record deployed in suite-script using a saved search
Create table for email content from array of objects.
Let variable arraOfObjects be an array containing objects. To convert it into table for email use the code below.
Saved search criteria to fetch sales order records that were created or edited within the last 24 hours (including line level).
SuiteScript to check whether the purchase order is fully received.
Here if purchase order is fully received true will be returned. Else, false will be returned.