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
Search Script Functions
I have been trying to get my head round the search script functions.
I have modified this code from another post and am struggling to understand exactly what everything does in order to modify it further. The filter functions are working fine, the code outputs the internal IDs of all the matching custom records.
What I am trying to achieve is also output the value of other fields such as custrecord36. Can anyone give me some guidance?
Thanks
var ContractID = nlapiGetRecordId(); var filters = new Array(); filters[0] = new nlobjSearchFilter( 'custrecord37', null, 'is', ContractID); var columns = new Array(); columns[0] = new nlobjSearchColumn( 'internalid' ); var searchresults = nlapiSearchRecord( 'customrecord25', null, filters, columns ); for (var i = 0; searchresults != null && i < searchresults.length; i++ ) { var searchresult = searchresults[ i ]; var record = searchresult.getId(); window.alert(record); } } 0