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
getting multiple 'formulanumeric' values after paging
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 0