I'm trying to create a Vendor Bank Account record with Odata (Nav 2017).
GET and PATCH methods work on the endpoint but POST always fails.
The json payload to the server is
{
'Vendor_No': 'V1000',
'Code': '1',
'Name': 'Test Bank',
}
The response I get from the server is:
"The Vendor Bank Account already exists. Identification fields and values: Vendor No.='',Code='1'"
Either there's a bug that drops the valid Vendor No. or because it's a foreign key and part of the composite key I need to do something different to get POST to work.
*This post is locked for comments
did you solved this issue?
Check the label value for the Vendor No in your Json Request. Try to retrieve and compare it with the request you are sending
Hi Brett,
I think the data with the information you have mentioned got created the first time and then after that you are trying to run the same code which is trying to insert the same data which is generating the error.
I would change the Key values and try again. Since you are inserting hard code values, you might have to change the value everytime you run the code.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,253 Super User 2024 Season 2
Martin Dráb 230,188 Most Valuable Professional
nmaenpaa 101,156