I am trying to insert a vendor record using the REST API. I am met with the following error message. "error": "Inserting 'Vendor' record raised at least one error. Please review the errors.; DiscTakenAcctID: 'Cash Discount Account' cannot be empty.; DiscTakenSubID: 'Cash Discount Sub.' cannot be empty.; TaxUseVendorCurPrecision: The Use Currency Precision flag was set because the tax report precision is equal to the currency precision",
The JSON I am sending looks like this.
{ "note": { "value": "Abhijit - Testing" }, "Cash Discount Account":{"value":"5922"}, "Cash Discount Sub":{"value":null}, "AccountRef": {}, "APAccount": { "value": "2000" }, "APSubaccount": { "value": "000" }, "CashAccount": {}, "CurrencyID": { "value": "USD" }, "CurrencyRateType": {}, "EnableCurrencyOverride": { "value": false }, "EnableRateOverride": { "value": false }, "FOBPoint": {}, "LandedCostVendor": { "value": false }, "LastModifiedDateTime": { "value": "2023-07-26T13:23:20.56+00:00" }, "LeadTimedays": {}, "LocationName": { "value": "Primary Location" }, "MaxReceipt": { "value": 100.000000 }, "MinReceipt": { "value": 0.000000 }, "ParentAccount": {}, "PaymentBy": { "value": "Discount Date" }, "PaymentLeadTimedays": { "value": 0 }, "PaymentMethod": { "value": "CHECK" }, "PaySeparately": { "value": false }, "PrintOrders": { "value": false }, "ReceiptAction": { "value": "Accept but Warn" }, "ReceivingBranch": {}, "RemittanceAddressOverride": { "value": true }, "RemittanceContactOverride": { "value": true }, "SendOrdersbyEmail": { "value": false }, "ShippingAddressOverride": { "value": true }, "ShippingContactOverride": { "value": true }, "ShippingTerms": {}, "ShipVia": {}, "Status": { "value": "Active" }, "TaxRegistrationID": {}, "TaxZone": {}, "Terms": { "value": "NET30" }, "ThresholdReceipt": { "value": 100.000000 }, "VendorClass": { "value": "ANCILLARY" }, "VendorIsLaborUnion": { "value": false }, "VendorIsTaxAgency": { "value": false }, "VendorName": { "value": "Computer Express" } }
This is very similar to the JSON that is retrieved from GetVendor record call. I have tried a few variations to send the cash discount and cash discount sub, but all of them have met with the same error. I have tried to send DiscTakenAcctID, Cash Discount Account, CashDiscountAccount.
How do I get around this to insert a vendor record?
Thank You,
Abhijit
Best answer by jinin
View original