最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

suitescript - Setting Values between Transactions - Stack Overflow

programmeradmin7浏览0评论

I'm trying to set the Rate of an item on a Purchase Order unto a custom transaction column on the Sales Order called Cost using a Workflow Action Script, but I'm finding issue accomplishing that on a multi-line Purchase Order.

salesOrderRecord.selectLine({
  sublistId: 'item',
  line: j
});

salesOrderRecord.setCurrentSublistValue({
  sublistId: 'item',
  fieldId: 'custcol1',
  value: itemRate
});

// Log

salesOrderRecordmitLine({
  sublistId: 'item'
});

It functions properly when the Purchase Order has one item but completely stops when the Purchase Order has multiple items/lines. It stops right before the mitLine method (at the Log) and doesn't continue on with the script.

If I put the .setCurrentSublistValue and mitLine methods into a try block, it runs properly through the entire Purchase Order and logs that the Sales Order record has been saved (using .save()) but when I check, the Cost hasn't been changed.

发布评论

评论列表(0)

  1. 暂无评论