:: Celigo :: 
Customer Login
 
SolutionsCustomersBlogAbout
On-Demand Simplified Solutions and services tailor made for on-demand

Accessing Script Parameters in v2007

| | Comments (0) | TrackBacks (0)

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.

0 TrackBacks

Listed below are links to blogs that reference this entry: Accessing Script Parameters in v2007.

TrackBack URL for this entry: http://www.celigo.com/~celigoco/blog-admin/mt-tb.cgi/2

Leave a comment