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.
New AI Community Guidelines. Please review and follow them to ensure AI use stays safe, accurate, and compliant.
Update: Narrative Insights has been restored and is now available.
Narrative Insights is Temporarily Unavailable due to an Infrastructure Issue. Learn how This Impacts Your Account and What to Expect While the Feature is Disabled.
Narrative Insights is Temporarily Unavailable due to an Infrastructure Issue. Learn how This Impacts Your Account and What to Expect While the Feature is Disabled.
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%
0