Skip to main content

Notifications

Announcements

No record found.

Finance | Project Operations, Human Resources, ...
Suggested answer

updating vendor bank is not working via odata

(3) ShareShare
ReportReport
Posted on by 1,297
Hi,

I already have a vendor 'XX' with BankAccount 'X1 and BankName as 'Test'


 
 
Now when i try to call this odata, by changing Routing Number only, i get this error
Since the key is the same, so shouldn't it consider it as an update by itself?

Cannot create a record in Supplier bank accounts (VendBankAccount). Bank account: X1, Test.\nThe record already exists



 
 
Categories:
  • Suggested answer
    Alireza Eshaghzadeh Profile Picture
    Alireza Eshaghzadeh 13,503 Super User 2024 Season 2 on at
    updating vendor bank is not working via odata

    Hi,

    It seems that the issue arises because it's trying to create a new record instead of updating an existing one. As Martin suggested, debugging could be a helpful approach.

    Additionally, please check if the value for the ISDEFAULTBANKACCOUNT field matches the value already present in the database (e.g., "Yes" or "No").

  • Martin Dráb Profile Picture
    Martin Dráb 230,717 Most Valuable Professional on at
    updating vendor bank is not working via odata
    I don't have the answer. I would use the debugger to see what happens during the import.
  • .. Profile Picture
    .. 1,297 on at
    updating vendor bank is not working via odata
    Hi Martin,

    I know that "Patch" does the update.

    but still if we use "Post" for an exisiting entity key, it detects it's an update automatically and does the update, just like importing via DMF.

    For example, if you try to do "Post" for CustCustomerV3Entity, where you specify an existing customer account, then it updates other fields. So why for the  vendor bank account entity it doesn't?
  • Suggested answer
    Martin Dráb Profile Picture
    Martin Dráb 230,717 Most Valuable Professional on at
    updating vendor bank is not working via odata
    The method is wrong indeed, but the right one is PATCH (not GET or POST).
  • Suggested answer
    Mohamed Amine Mahmoudi Profile Picture
    Mohamed Amine Mahmoudi 12,637 Super User 2024 Season 2 on at
    updating vendor bank is not working via odata
    Hi @..,
     
    You need to you GET request instead of POST.
     
    Best regards,
    Mohamed Amine MAHMOUDI

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

Congratulations 2024 Spotlight Honorees

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December

Congratulations to our December super stars! 🥳

Share Your Event with the Community

Jump start your event engagement! 📢

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,961 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,717 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans