Discussions
Stay up-to-date with the latest news from NetSuite. You’ll be in the know about how to connect with peers and take your business to new heights at our virtual, in-person, on demand events, and much more.
New AI Community Guidelines. Please review and follow them to ensure AI use stays safe, accurate, and compliant.
Trouble loading a record from client script
I'm almost positive this used to work:
function OnInit(type) { try { var entityId = nlapiGetFieldValue('entity'); alert('about to load the customer ' + entityId); var customer = nlapiLoadRecord('customer', entityId); alert('customer loaded'); } catch(e) { HandleClientScriptException(e); alert('An Error has occurred. The administrators have been notified via email.'); } } The alert after nlapiLoadRecord() is never called. I have verified that the entity ID is valid. I'm running this script from a Sales Order. I can't think of what else to tell you.
Anyone think why nlapiLoadRecord would fail? It's not throwing an nlobjError exception so I can't get any details.
Steve Klett | Senior Developer
NetValue Technology
0