Return Multiple Values to Next Script Entry Points

There are scenarios where we have to pass or return multiple values to another Entry point, so that value can process as per the requirement.Normally, The first Return statement that holds some specific data in any Entry point is accessible to next Point by logging the context in initial line.This is not feasible in cases… Continue reading Return Multiple Values to Next Script Entry Points

Store Errors in script as a csv file

//Info: JOIN-203 Bugs & errors are common in every script. Usually, we used to Identify these by using try and catch statements.what if there are chances to get ‘n’ number of errors in each part…? its better if we are able identify errors in initial run, save it & continue the next section. Even though… Continue reading Store Errors in script as a csv file

How to add values to an email template from a custom record and send email

We can use email templates for easily sending emails between two records having a contact. Email templates are helpful when the emails should follow a specific format or have some common content like company logo and address.Email templates can be accessed using the navigation: Documents> Templates > Email templatesIf needed to add field values from… Continue reading How to add values to an email template from a custom record and send email

Vendor Bill error – “Your formula has an error in it…”

Encountering an error on the Approval Page of transactions may hinder users toperform bulk approval which can also prolong their daily tasks and processes.Users can mass submit for approve, reject, re-submit for approval in the ApproveVendor Bill Page if the Approval Routing = T. The Actions in the Approve Bills Page arethe actions from the… Continue reading Vendor Bill error – “Your formula has an error in it…”

Backend Suitelets

Backend Suitelets are suitelets that do not generate any UI elements.  Their sole purpose is to execute backend logic, which can then be parsed by other parts of a custom application. Just like a Suitelet that builds NetSuite pages, a backend Suitelet is invoked by making HTTP GET or POST calls to a NetSuite-generated Suitelet… Continue reading Backend Suitelets

Map-Reduce script example

Map/Reduce scripts in NetSuite is a scheduled script type that can work on large set of data. It is intended for parallel bulk data operations. They offer more power and benefits over the standard Scheduled scripts.This is a sample code of a map-reduce script for sending emails to all customers with pending invoices that are… Continue reading Map-Reduce script example

Delete Multiple Records By Calling Array Elements

//Info: JOIN-185 Requirement: Create a MapReduce script to delete the Sales order Records.In these cases, Normally we set a saved search criteria to met the requirement & retrieve the data’s from the search script and then proceed with the Deletion mapping. In case of sales order, we have multiple set of records linked to a… Continue reading Delete Multiple Records By Calling Array Elements

Drop-ship Purchase Orders.

Drop-ship Purchase Orders can only be created by manually clicking either the Drop Ship or Spec. Ord link on the Sales Order’s line item. Below is a sample code snippet to create it using SuiteScript 2.0.  var salesOrderId = ‘12345’; var entityId = nlapiLookupField(‘salesorder’, salesOrderId, ‘entity’);var vendorId = ‘777’; var params = {‘recordmode’ : ‘dynamic’,‘soid’ :… Continue reading Drop-ship Purchase Orders.