For anyone interested in the answer to the earlier...
# suitescript
t
For anyone interested in the answer to the earlier question about contacts and specific roles, I had to call NS support but they finally found an answer - you can't use the "Company" or "Customer" property of the contact record to search on - you have to use the join fields for either Company or Customer and then look for the specific company. function getContactsByRole(custID, roleId){ var cFilters = []; cFilters.push(search.createFilter({name: 'internalid', join:'company', operator: search.Operator.ANYOF,value: [custID]})); cFilters.push(search.createFilter({name: 'role', operator: search.Operator.ANYOF,value: [roleId]})) var contactSearch = search.create({ type: 'contact', filters: cFilters, columns: ['internalid'] }) var contacts = contactSearch.run(); contacts.each(function(contact){ log.debug('Contact ID:', contact.getValue('internalid')) return true; }) }