- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
尝试使用 NetSuite 销售订单转换
var fulfillment = record.transform({
fromType: record.Type.SALES_ORDER,
fromId: currentRecord.id,
toType: record.Type.ITEM_FULFILLMENT,
isDynamic: true
});
收到错误“USER_ERROR”,“消息”:“您必须为此交易输入至少一个订单项。”
fulfillment 包含 7 个行项目,但在 fulfillment.save() 之后返回错误,即没有行项目添加到 fulfillment。
有没有办法选择要履行的行?想一想,在查看销售订单时,您如何点击 fulfill,然后点击您想要包含在该 fulfillment 中的行项目的复选框。
谢谢
最佳答案
有一个名为“itemreceive”的交易列字段。此“itemreceive”字段等同于 UI 中“项目履行创建记录”页面上的“履行”复选框。以下代码应该可以工作
//transform SO to create a new Item fulfillment
var fulfillment = record.transform({
fromType: record.Type.SALES_ORDER,
fromId: currentRecord.id,
toType: record.Type.ITEM_FULFILLMENT,
isDynamic: true
});
//get line count of newly created fulfillment
var lineCount = fulfillment.getLineCount({
sublistId: 'item'
});
//for each line set the "itemreceive" field to true
for (var i = 0; i < lineCount; i++) {
fulfillment.selectLine({
sublistId: 'item',
line: i
});
fulfillment.setCurrentSublistValue({
sublistId: 'item',
fieldId: 'itemreceive',
value: true
});
//set other relevant sublist fields
fulfillment.setCurrentSublistValue({
sublistId: 'item',
fieldId: 'fieldId',
value: 'value'
});
fulfillment.commitLine({
sublistId: 'item'
});
}
//set any other relevant itemreceive fields
itemreceive.setValue({
filedId: 'fieldId',
value: 'value'
});
//save the newly created itemreceive
var itemreceiveId = itemreceive.save({
enableSourcing: true, //optional, defaul is false
ignoreMandatoryFields: true //optional, defaul is false
});
关于javascript - 在将 netsuite 销售订单转换为履行时,您如何选择要履行的订单项?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/68490597/
我正在创建一个项目来使用评级系统评估不同的产品,但由于我是新手,所以我有几个问题。 首先,为了实现这个目标,我创建了一个 ListView ,它允许我使用从该数据库获取的 JSON 代码显示 MySQ
在对学校的大型作业进行故障排除时,我发现了一个错误,我将单个项目列表(包含一个项目的堆栈)视为单个项目。我解决了我的问题,但是在进一步的测试中我注意到一些奇怪的事情: 48 ?- 1 is [1].
嘿,我正在修改我在 Internet 上找到的示例应用程序。 (学习2破解)我想在我的 ReclycerView 中获取单行的 ID。这是代码。 主要 private void initVie
我在一个项目中使用 ASP.NET MVC SiteMap 提供程序,它运行良好。但是,我很难弄清楚如何隐藏菜单项。我想在全局导航中隐藏的菜单项是我的“站点地图”页面。现在我知道有一个东西叫做 Vis
我是一名优秀的程序员,十分优秀!