Discussions
Read on for the latest updates including:
• Agenda Builder launch
• SuiteWorld On Air registration
• New NetSuite Prompt Studio Contest
• And more!
Check out this thread to learn more!
Discount-type Item Column returns "-100.0%" in client script but "-100" for ever
I'm writing a SuiteScript 2.0 Scheduled Script to copy data from some (but not all) Items in a Sales Order over to a new Custom record type.
The trouble is with the "rate" column on Sales Order : Item sublist.
If I use:
var lineCount = salesOrder.getLineCount({ sublistId: 'item' });
for (var i = 0; i < lineCount; i++){
var itemRate = salesOrder.getSublistValue({ sublistId: 'item', fieldId: 'rate', line: i });
log.debug("itemRate", itemRate);
log.debug("item rate text", salesOrder.getSublistText({ sublistId: 'item', fieldId: 'rate', line: i }));
}
then I get "-100" in the first DEBUG log,
and "-100.00" in the second.
This would be fine if the Item : Rate was set to -100, but it's set to -100.0%