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.
Now is the time to ask your NetSuite-savvy friends and colleagues to join the NetSuite Support Community! Refer now! Click here to watch and learn more!
Stay in the Know
Be sure you're subscribed to NetSuite communication to stay in the know about monthly happenings, updates and announcements. Subscribe
Be sure you're subscribed to NetSuite communication to stay in the know about monthly happenings, updates and announcements. Subscribe
Searching for Phone Calls
Hello,
I am having a heck of a time getting this to work and I think I am missing something very simple. I need a script to run on customer save (client-side) to check if they have any scheduled phone calls and set a custom checkbox depending on the results.
The code:
customerNumber = nlapiGetRecordId(); var filters = new Array(); filters[0] = new nlobjSearchFilter('company', null, 'anyOf', customerNumber, null); filters[1] = new nlobjSearchFilter('status',null,'is','2',null); var columns = new Array(); columns[0] = new nlobjSearchColumn('startdate'); var callresults = nlapiSearchRecord('phonecall',null,filters,columns); if (callresults != null) { nlapiSetFieldValue('custentity_schedcallback','T'); } else { nlapiSetFieldValue('custentity_schedcallback','F'); } 0