Ash
Ash

Reputation: 1649

Unable to post Vendor_Payment for NetSuite using Restlet (SS2)

I have written below logic to post payment for a specific bill. I am however getting the error

INVALID FIELD VALUE","details":"You have entered an Invalid Field Value 129 for the following field: account"

I can see this account available, I tried accountid, acctnum and others. No luck so far !

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();
  }

Upvotes: 0

Views: 688

Answers (1)

Rusty Shackles
Rusty Shackles

Reputation: 2840

Are you using NetSuite OneWorld? If you are you need to make sure that the account with internal id 129 can be used for the subsidiary of the Vendor you are using in the Vendor Payment record.

Upvotes: 2

Related Questions