Suitescript 2.0创建%折扣商品

问题描述 投票:0回答:1

我尝试使用Suitescript 2.0创建折扣商品,但出现以下错误:

“ message”:“您为以下字段输入了无效的字段值70.0%:rate”

                    fieldId: 'rate',
                    value: (rate_discount.toFixed(1))+'%'
                });

在Netsuite UI上,我可以将%添加到Rate字段,并且我需要它可以按百分比对项目进行评分。

如何使用%汇率创建此项目类型?

提前感谢。

netsuite suitescript2.0
1个回答
1
投票

您可以使用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();
© www.soinside.com 2019 - 2024. All rights reserved.