Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics 365 | Integration, Dataverse...
Answered

Odata - Update failed when trying to update entity via Postman (404 resource not found)

(1) ShareShare
ReportReport
Posted on by 14
Hi,
 
We are working with a custom built entity called CC_PartsTraderTransaction which contains invoice lines in D365. I want to update one field in this entity known as PTInvoice using the PATCH verb. An example of a Get call for this CC_PartsTraderTransaction entity returns:
 
 
The defined key for this entity is:
 
 
When I perform a PATCH to update the PTInvoice value to be Yes for a specific item I get a 404 resource not found and yet I know that this invoice exists. Why could this be the case ? What is wrong with the URL construct I am using ?
 
 
Secondly, is there a way to update multiple invoices in the same ODATA API call, ie. the URL does not contain the params of the row to update but the request body contains an array of invoice lines with the required key entity data specified for each row to update.
  • Christine B Profile Picture
    14 on at
    Odata - Update failed when trying to update entity via Postman (404 resource not found)
    Hey layan, I'm trying to verify your answer but I get a 403. I'm afraid I can't verify it. Will keep trying though.
  • Layan Jwei Profile Picture
    7,727 Super User 2025 Season 1 on at
    Odata - Update failed when trying to update entity via Postman (404 resource not found)
    Hi,

    I'm glad your issue is fixed :)

    Please don't forget to verify the answers that solved your issue.
  • Christine B Profile Picture
    14 on at
    Odata - Update failed when trying to update entity via Postman (404 resource not found)
    Hey Layan, fantastic that worked. Removing the single quotation from the URL and just having the attribute to update in the request body. Thank you.
  • Verified answer
    Layan Jwei Profile Picture
    7,727 Super User 2025 Season 1 on at
    Odata - Update failed when trying to update entity via Postman (404 resource not found)
    Hi CB,

    After you changed the body format, I think you also need to remove the single quotation for the InvoiceDate in the URL:
    https://xxxxxxxxxxx.dynamics.com/data/CC_PartsTraderTransaction(dataAreaId='sk',Voucher='APIMP000032562',InvoiceNumber='66504331',InvoiceDate=2019-07-27T12:00:00Z)?cross-company=true

    give it a try and let us know
    ​​​​​​​
    Thanks,
    Layan Jweihan
    Please mark this answer as "Verified" if it solved your issue. In order to help others who will face a similar issue in the future.
  • Suggested answer
    Anthony Blake Profile Picture
    2,343 Super User 2025 Season 1 on at
    Odata - Update failed when trying to update entity via Postman (404 resource not found)
    Hi,
     
    Take a look at the customer PATCH example here in case it helps, its a working example from a standard table:
     
     
    To answer your second point, you can send multiple OData requests at once, but not as a simple array. The method is using OData $batch, which involves sending an array of requests rather than an array of records.
     
  • Suggested answer
    Leah Ju Profile Picture
    Microsoft Employee on at
    Odata - Update failed when trying to update entity via Postman (404 resource not found)
    Hi,
    You should provide GUID of the record in your patch request:
    You can refer to this blog for detailed steps:
  • Christine B Profile Picture
    14 on at
    Odata - Update failed when trying to update entity via Postman (404 resource not found)
    Hi Layan,
     
     
    However, I still get the http 404 response.
  • Verified answer
    Layan Jwei Profile Picture
    7,727 Super User 2025 Season 1 on at
    Odata - Update failed when trying to update entity via Postman (404 resource not found)
    Hi,

    I think it's because the body format is wrong. Try to put the body like this:
     
    {
        "PTInvoice""Yes"
    }


    For example, if i want to update the customer currency, here's what i would do with PATCH:
    url/data/CustomersV3(CustomerAccount='xx',dataAreaId='yy')
     
    and the body will be like this:
    {
        "SalesCurrencyCode""USD"
    }

    ​​​​​​​

    Thanks,
    Layan Jweihan
    Please mark this answer as "Verified" if it solved your issue. In order to help others who will face a similar issue in the future.

     

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 293,278 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,979 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156 Moderator

Leaderboard

Product updates

Dynamics 365 release plans