Hi There,
I am trying to set the department field on a bill payment based on a custom record stored against the account field.
The custom Field ID is "custrecord1" with Type List Record and has the Department List.
The code I have is
function OnSave_Set(type)
{
var account = nlapiGetFieldValue('account');
{
var company = nlapiLookupField('account', 'custrecord1');
nlapiSetFieldValue('department', company, true);
}
return true;
}
The error I am getting is
OnSave_Set (saveRecord)
customform
JS_EXCEPTION
ReferenceError OnSave_Set is not defined