Posts

HOW TO OVERCOME GOVERNANCE LIMIT IN SCHEDULE SCRIPT?

Feel free to reach your  NetSuite Solution Provider  , TheSmilingCoders for proper  netsuite implementation ,  netsuite consultation  ,  netsuite customization ,  netsuite Support , netsuite Training Schedule script has a governance limit of 10000 units. In many situations, schedule script is used for processing huge amount of data and this might take more than 10000 units. To overcome this problem, Netsuite provides the api's  nlapiSetRecoveryPoint() and nlapiYieldScript() . This creates a recovery point and re-executes the schedule script from where it left and its governance units are also reset. It can create a recovery point even inside a for or while loop. nlapiSetRecoveryPoint() consumes 100 units. The below code explains how to use these api's if(nlapiGetContext().getRemainingUsage()<300) {                        nlapiSetRecoveryPoint();     ...

HOW TO INCLUDE HTML AND CSS IN SUITELET SCRIPT?

Suitelets are of two types- Front end and Back end. Front end suitelet is used for creating forms, assistants etc. Sometimes we can't create the UI by using only Netsuite API's. We might have to use html and css to build the page. The following ocde shows how it can be done: Feel free to reach your  NetSuite Solution Provider  , TheSmilingCoders for proper  netsuite implementation ,  netsuite consultation  ,  netsuite customization ,  netsuite Support , netsuite Training,  contact us at: Email : info@smilingcoders.com   var html = '<!DOCTYPE html>\n'             +'<html>\n'             +'<head>\n'            +'<link href="https://system.netsuite.com/core/media/media.nl?id=1234&_xt=.css" rel="stylesheet" media="print" />\n' // replace this with your css url from file cabinet           ...

USING NETSUITE API nlapiSetCurrentLineItemMatrixValue

Feel free to reach your  NetSuite Solution Provider  , TheSmilingCoders for proper  netsuite implementation ,  netsuite consultation  ,  netsuite customization ,  netsuite Support , netsuite Training,  contact us at: Email : info@smilingcoders.com There are many api's in Netsuite which are not frequently used in customization's but has lot of importance. nlapiSetCurrentLineItemMatrixValue can be used to set the price of an item in the item record. This cannot be achieved by using the api nlapiSetLineItemValue. The following code can used with or without changes depending on the scenarios to set the base price of an item in the item record : var total = 100; nlapiSelectLineItem('price', i);   nlapiSetCurrentLineItemMatrixValue('price', 'price', i, total);    nlapiCommitLineItem('price'); Feel free to reach your  NetSuite Solution Provider  , TheSmilingCoders for proper  netsuite imple...

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

Feel free to reach your  NetSuite Solution Provider  , TheSmilingCoders for proper  netsuite implementation ,  netsuite consultation  ,  netsuite customization ,  netsuite Support , netsuite Training,  contact us at: Email : info@smilingcoders.com Below code loads a sales order, reads it's sublist values and sets value of a custom field. Email : info@smilingcoders.com /**  *@NApiVersion 2.x  *@NScriptType UserEventScript  */ define(['N/record','N/log'], // modules used     function(record,log) {             function afterSubmit(context) {             if (context.type !== context.UserEventType.DELETE)             {                                  var rec_id = context.newRecord.id; // get record id         ...

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. Feel free to reach your  NetSuite Solution Provider  , TheSmilingCoders for proper  netsuite implementation ,  netsuite consultation  ,  netsuite customization ,  netsuite Support , netsuite Training,  contact us at: Email : info@smilingcoders.com 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 when user selects a date. Below is the sample code: replcae the link url with your url  var html = '<!DOCTYPE html>\n' +'<html>\n' +'<head>\n' +'<meta charset="utf-8" />\n' +'<link href="https:/...

HOW TO CREATE SUITELET ASSISTANT IN NETSUITE?

Creating a suitelet assistant involves the following steps: Feel free to reach your   NetSuite Solution Provider   , TheSmilingCoders for proper   netsuite implementation ,  netsuite consultation  ,  netsuite customization ,  netsuite Support , netsuite Training,  contact us at: Email : info@smilingcoders.com 1)  Create the assistant. 2)  Create steps. 3) Attach client script to validate data on page init, field change, save ( when user clicks on next or finish) or any other trigger function supported by client script. 4)  Build pages for each step. (Get Function) 5) Set values for fields 6) Set up the action when user clicks on next, cancel, back or finish. (Post function) 1) Create the assistant First step is to create assistant by using the api. You can provide name of the assistant under the api parameter. var assist = nlapiCreateAssistant('SUITELET ASSISTANT); 2)  Create steps. Second step is to assign ste...

PROCURE TO PAY FLOW IN NETSUITE- NETSUITE ACADEMY

Procure to Pay involves the following steps in Netsuite 1) Create Purchase Order. 2) Approve Purchase order. 3) Create Item Receipt. 4) Create Vendor bill. 5) Create Vendor Payment. Feel free to reach your  NetSuite Solution Provider  , TheSmilingCoders for proper  netsuite implementation ,  netsuite consultation  ,  netsuite customization ,  netsuite Support , netsuite Training,  contact us at: Email : info@smilingcoders.com