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.
Customer Center throws "The author internal ID or email must match an employee" error
Both customers and prospects can log into our Customer Center, once granted access. I have a custom script which checks a particular field on the customer record.
If the visitor is a customer, no errors happen.
If the visitor is a prospect, an error is thrown while fetching their record. The script contains the following and fails at the nlapiLoadRecord:
var ctx = nlapiGetContext(); var last_update_pref = ctx.getSetting('SCRIPT', 'custscript_eula_lastupdated'); var user_id = ctx.getUser(); nlapiLogExecution('AUDIT', 'showEULA start', 'Starting with user_id ' + user_id); var rec = nlapiLoadRecord('customer', ctx.getUser()); // ERROR HERE, NEVER LOGS THE FOLLOWING: nlapiLogExecution('AUDIT', 'showEULA fetch', 'Customer record fetched for customer ' + user_id); 0