We are experiencing a problem with the nlapiLoadRecord() function when it is invoked by the Field Changed Function in the client script of a Customer form for non Administrator roles (works fine for Administrators). The following code results in an error ReferenceError:_funcname is not defined.
var customStatusId = nlapiGetFieldValue(fieldName);
var customStatusRecord;
try {
[INDENT]customStatusRecord = nlapiLoadRecord('customrecord35', customStatusId);[/INDENT]
} catch(error) {
[INDENT]alert("ERROR LOADING: " + error);[/INDENT]
[INDENT]return false;[/INDENT]
}
customrecord35 is a custom record type we have defined. The Use Permissions checkbox is un-checked and no permissions are defined in the permissions tab.
If I check the Use Permissions checkbox and add a view permission for the non Administrator role I'm using - then the error does not occur and everything works fine.
This seems like a bug to me - since I think if Use Permissions is un-checked then any role should be able to access that record (and the nlapiLoadRecord() function should work)?