Discussions
Searching Employee Name via InternalId
I'm new to scripting and NetSuite so excuse my ignorance. I have searched both NetSuite help and the user group, but did not find anything relevant to what I am trying to accomplish. The script below is using the nlapiGetUser to lookup the employee firstname and lastname. I am currently just trying to display that information in an alert (eventually storing it in a custom field). The alert is returning undefined for both the firstname and lastname. What am I missing? Thanks for looking and any suggestions!
var userName = nlapiGetUser();
var filters = new Array();
filters[0] = new nlobjSearchFilter('internalid', null, 'is', userName, null);