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); } }