无法使用Restlet(SS2)为NetSuite发布Vendor_Payment

时间:2018-01-23 15:06:45

标签: netsuite suitescript suitescript2.0

我已经写下了逻辑来发布特定账单的付款。然而,我收到了错误

  

INVALID FIELD VALUE“,”details“:”您输入了无效字段   以下字段的值129:account“

我可以看到这个帐户可用,我试过accountid,acctnum和其他人。到目前为止没有运气!

function _post(context) {
   var vendorBillPayment = record.create({
            type: record.Type.VENDOR_PAYMENT,
            isDynamic: false,
            defaultValues: {
                entity: 1054
            }
        })

        vendorBillPayment.setValue({
            fieldId: 'entityname',
            value: "Nikon"
        })

        vendorBillPayment.setValue({
            fieldId: 'account',
            value: 129
        })

        vendorBillPayment.setValue({
            fieldId: 'currency',
            value: 1
        })

        vendorBillPayment.setValue({
            fieldId: 'customform',
            value: 45
        })

        vendorBillPayment.setValue({
            fieldId: 'exchangerate',
            value: "1.00"
        })

        var recordId = vendorBillPayment.save();
  }

1 个答案:

答案 0 :(得分:2)

您使用的是NetSuite OneWorld吗?如果您需要确保内部ID为129的帐户可用于您在供应商付款记录中使用的供应商的子公司。