I am having some suddenly strange things with errors noting 'undefined' functions, variables and objects. These undefined items are listed in the script library file identified with the script file in custom code section of form. Seems the script can not see the library script although library script checks out as working when tested independently of NetSuite.
Has anyone else run into this issue of late. Everything was working fine up until a week or so ago.
Also, along those same lines I got the following error this morning from a Server-side script which makes no sense. The function called by the script is located in an accompaning library file, yet the function itself did not fail but the call to the NetSuite object nlobjScriptError which should obviously not have failed. Any clues or suggestions?
Below is the server error message and the function where it failed.
Date & Time: 10/25/2006 12:06 am
Execution Time: 0.89s
Script Usage: 10
Script: _bnnCaseRespondBySearch
Error: UNEXPECTED_ERROR
ReferenceError: "nlobjScriptError" is not defined. (_bnnCaseRespondBySearch#1012)
Stack Trace:
#_bnnCaseRespondBySearch
Actual function where nlobjScriptError is defined (separate library file):
function csiWriteToErrorLog(type, e) {
var lineNum = -1;
if ( csiWriteToErrorLog.arguments.length > 2 ) {
lineNum = parseInt(csiWriteToErrorLog.arguments[2]);
// don't allow 0 or less for line numbers
if ( lineNum <= 0 ) { lineNum = -1; }
}
var errMessage = "";
if ( e instanceof nlobjScriptError ) {
errMessage = ""+e.getCode()+": "+e.getDetails();
} else {
errMessage = e.message;
}
type = type.toUpperCase();
var eType = "";
switch (type) {
case 'AUDIT' : eType = ""; break;
case 'DEBUG' : eType = "Debug: "; break;
default :
eType = "Error: "; break;
}
var errStr = eType+(lineNum==-1?"":"[line "+lineNum+"] ")+errMessage;
nlapiLogExecution (type, errStr);
}