I've got a search large enough to have to put through paging. I'm trying to get the values for multiple formulas in each page. When the search is put through pagination, it only gives the value for the first formulanumeric. I need help getting each value. Here is my code for reference.
var closingMonthSearch = search.create({ type: record.Type.SALES_ORDER, columns: ['department', 'type', 'datecreated', 'item', 'tranid', 'entity', 'quantity', 'shiprecvstatusline', 'quantitybilled', 'quantityshiprecv', 'effectiverate', 'rate', 'closed', 'line', search.createColumn({ name: 'formulanumeric', label: 'formula1', formula: '{quantity}-{quantityshiprecv}', sort: search.Sort.ASC }), search.createColumn({ name: 'formulanumeric', label: 'formula2', formula: '({quantity}-{quantityshiprecv})*{effectiverate}', sort: search.Sort.ASC }), search.createColumn({ name: 'formulanumeric', label: 'formula3', formula: 'case when {effectiverate} = 0 then ({quantity}-{quantityshiprecv})*{rate} else 0 end', sort: search.Sort.ASC }), 'custbody16'], filters: [ ['type', 'anyof', 'SalesOrd'], 'and', ['account', 'anyof', '54'], 'and', ['datecreated', 'after', 'monthsago20'], 'and', ['closed', 'is', 'F'] ] }); closingMonthSearch.filters.push(search.createFilter({ name: 'formulanumeric', operator: 'greaterthan', values: '0', formula: '{quantity}-{quantityshiprecv}' })); var myPagedData = closingMonthSearch.runPaged({pageSize: 1000}); var resultSet = new Array(); myPagedData.pageRanges.forEach(function(pageRange){ var myPage = myPagedData.fetch({ index: pageRange.index }); myPage.data.forEach(function(result){ // Trying to get the values here to push to an array. // 'result' gives me roughly this list of values 'department', 'type', 'datecreated', 'item', 'tranid', 'entity', 'quantity', 'shiprecvstatusline', 'quantitybilled', 'quantityshiprecv', 'effectiverate', 'rate', 'closed', 'line', 'formulanumeric' // first formula value // I need the second formulanumeric value // I need the third formulanumeric value 'custbody16'