:: Celigo ::
ProductsCustomersBlogAbout
On-Demand Simplified Solutions and services tailor made for on-demand

Accessing Script Parameters in v2007

Beware… NetSuite has changed the way you are allowed to access a SuiteScript parameter with version 2007.

Where we used to do something like this in version 11.x: 

if ((typeof custscript_case_debug != “undefined”) && (custscript_case_debug == ‘T’)) {
   debug = true;
   nlapiLogExecution (’DEBUG’, ‘Debug mode is turned on’);
}

We must now do the following with version 2007:

var value = nlapiGetContext().getSetting(’SCRIPT’, ‘custscript_case_debug’);
if (value  == ‘T’) {
   debug = true;
   nlapiLogExecution (’DEBUG’, ‘Debug mode is turned on’);
}

Note that this WILL break your existing scripts when you move to version 2007.

Tags: ,

Leave a Reply

Spam Protection by WP-SpamFree