Posts

Showing posts from June, 2018

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();                      nlapiYieldScript(); } Put the above code at a point where it can check

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             +'</head>\n'             +'<body>\n'             +'&l

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 implementation ,  netsuite consultation