web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics NAV (Archived)

Odata Post with composite key (Vendor Bank Account)

(0) ShareShare
ReportReport
Posted on by

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

I have the same question (0)
  • Suggested answer
    Rabin Profile Picture
    2,976 on at

    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.

  • Suggested answer
    Suresh Kulla Profile Picture
    50,243 Super User 2025 Season 2 on at

    Check the label value for the Vendor No in your Json Request. Try to retrieve and compare it with the request you are sending

  • sami khan Profile Picture
    45 on at

    did you solved this issue?

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics NAV (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans