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