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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

304 response from WebApi

(0) ShareShare
ReportReport
Posted on by 3,115

Hi Techeies


Facing a strange problem (in OOB organization as well). I have an entity (say account) which has 1:n relation with another entity (say contact). I'm using webapi to retrieve data of parent & child entities using following query.

https://MYORG.api.crm8.dynamics.com/api/data/v8.1/accounts%28475b158c-541c-e511-80d3-3863bb347ba8%29?$select=name&$expand=contact_customer_accounts%28$select=fullname%29


This is working fine when for the first time i'm retrieving data. If I Associate one another contact to the same account and run the query it is not reflecting the newly added query. In this scenario fiddler is showing response status 304. Also, this is always happening if I open it through Firefox and in some machines it is happening in IE as well.

I have even tried with request header "Cache-Control: no-cache", but no success. Any one faced this kind of problem ? Is there any way that I can force WebApi to return data all the times ?

Thank you

Srikanth.

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    DigitalFlow Profile Picture
    80 on at

    Hey there,


    you probably already solved your problem, but I found the solution for anyone coming here:

    Attach the "If-None-Match" header with empty string value to Get requests and you will receive a new response for each request.

    Code:

    xhr.setRequestHeader("If-None-Match", null);

    Be sure to really pass null and not an empty string, as IE will inject the last E-Tag instead of the empty string that you passed and thus activate caching again...


    Kind Regards,

    Florian

  • ansrikanth Profile Picture
    3,115 on at

    Wow, That is a nice hack, It wasn't solved yet, but I got an alternate for the situation henceforth left it over there.. Thanks for the help anyways, I will check it..

    Btw, We have raised a ticket with MS at the same time, after 10 to 12 calls also there is no proper solution for this from MS and we thought of leaving the ticket as we are bit occupied in other works :)

  • thomasjs Profile Picture
    User Group Leader on at

    This helped me a lot. I was using the rest builder in Dynamics 365, and getting cached info back.

    docs.microsoft.com/.../compose-http-requests-handle-errors

    This was the link I as trying to use, but I got the syntax wrong. With the " at the right place, my null was right;)

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
JS-09031509-0 Profile Picture

JS-09031509-0 3

#2
AS-17030037-0 Profile Picture

AS-17030037-0 2

#2
Mark Eckert Profile Picture

Mark Eckert 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans