suitescript - Setting Values between Transactions - Stack Overflow

I'm trying to set the Rate of an item on a Purchase Order unto a custom transaction column on the

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.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745586729a4634585.html

相关推荐

  • suitescript - Setting Values between Transactions - Stack Overflow

    I'm trying to set the Rate of an item on a Purchase Order unto a custom transaction column on the

    9小时前
    50

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信