NetSuite SuiteScript 2.0

Resolve Netsuite Scripting Error “Cannot read property “length” from null”

One of the common errors while searching a record using script is  “Cannot read property length from null”. This error occurs when you try to get length of search record object which returns a null value.Length method can be used only if search record API returns some value. If it returns null, then length method should […]

NetSuite suitecommerce advanced suitescript

HOW TO CREATE A FULL CALENDAR IN NETSUITE USING SUITELET?

A full calendar can be built in netsuite using suitelet script. This would require you to first download the zip file from https://fullcalendar.io/download. Place this file at file cabinet and note down the url of fullcalendar.min.css, fullcalendar.print.min.css, /lib/moment.min.js, /lib/jquery.min.js, fullcalendar.min.js. You can also create a client script and refer that url in html link ref, so that it can be triggered […]

SuiteScript 2.0

USER EVENT SCRIPT 2.0 TO LOAD A RECORD, READ IT’S VALUE AND SET A FIELD VALUE

Below code loads a sales order, reads it’s sublist values and sets value of a custom field. /** *@NApiVersion 2.x *@NScriptType UserEventScript */define([‘N/record’,’N/log’], // modules used    function(record,log) {           function afterSubmit(context) {            if (context.type !== context.UserEventType.DELETE)             {                  […]