我尝试使用Suitescript 2.0创建折扣商品,但出现以下错误:
“ message”:“您为以下字段输入了无效的字段值70.0%:rate”
fieldId: 'rate',
value: (rate_discount.toFixed(1))+'%'
});
在Netsuite UI上,我可以将%添加到Rate字段,并且我需要它可以按百分比对项目进行评分。
如何使用%汇率创建此项目类型?
提前感谢。
您可以使用setText
。
var discountItem = record.create({type: record.Type.DISCOUNT_ITEM, isDynamic:true});
discountItem.setValue({fieldId:'itemid', value:'testDiscountItem'});
discountItem.setText({fieldId:'rate',text:'8.5%'});
discountItem.save();