I don't think it's the issue personally but one of:
itemIntID = itemIntID .toString()
var itemIntID = (newRecord.getSublistValue({sublistId: 'item', fieldId: 'itemid', line: i})).toString();
var searchResults = search.create({
type: "salesorder",
filters: [["name","anyof",custIntID], "AND", ["item","anyof",itemIntID.toString()], "AND", ["type","anyof","SalesOrd"], "AND", ["closed","is","F"]],
columns: [search.createColumn({name: "trandate", sort: search.Sort.DESC}), "rate"]}).run().getRange({start:0, end: 1});