Wednesday 25 June 2014

CRM 2011/2013 OData Error: 404: Not Found:Resource not found for the segment

When you using SDK.Rest + OData Query, you can receive this following error:

Error:”404: Not Found:Resource not found for the segment ‘productSet’”

image

Cause:


It is because in ODataQuery, the name of entity and attribute are case sensitive.

Resolution:

Check in this code line:

SDK.REST.retrieveMultipleRecords("product", options, retrieveProductCallBack, function (error) { alert(error.message); }, productRetrieveComplete);

then change to:

SDK.REST.retrieveMultipleRecords("Product", options, retrieveProductCallBack, function (error) { alert(error.message); }, productRetrieveComplete);

Because when you see in the OData Query Designer:

It is ProductSet, it is not productSet
image

Hope it helps!

3 comments:

My Name is..