Discussions
nlapiScheduleScript Error Looking for a Title
I have the following code in our production account (recently updated to 2010 vr 2)
var params = new Array();
params['custscript_processitem_recordtype'] = recordType;
params['custscript_processitem_transactionid'] = String(transaction.getId());
params['custscript_processitem_itemid'] = String(item.getId());
params['custscript_processitem_label'] = label;
params['custscript_processitem_sublist'] = subList;
params['custscript_processitem_linenum'] = String(finalLineNum); // Changed from i
nlapiLogExecution ('DEBUG', 'recordType ' + recordType);
nlapiLogExecution ('DEBUG', 'transactionid ' + String(transaction.getId()));
nlapiLogExecution ('DEBUG', 'itemid ' + String(item.getId()));
nlapiLogExecution ('DEBUG', 'label ' + label);
nlapiLogExecution ('DEBUG', 'subList ' + subList);
nlapiLogExecution ('DEBUG', 'linenum ' + String(finalLineNum)); // Changed from i
var sched = nlapiScheduleScript('customscript_processitem', null, params); //+20