Quantcast
Channel: Microsoft Dynamics CRM Forum - Recent Threads
Viewing all articles
Browse latest Browse all 82002

C# Plugin Question - Custom Entity not found

$
0
0

Hi. I have been using the Microsoft tutorials to understand plugins and (ex HttpResponseMessage & HttpClient).

The Task below works fine when my query parameter is either the "contacts" or "accounts" entities. I created a custom entity - "Automobile" which I am able to perform CRUD operations, create processes etc. from the CRM application, however, when I try to run the plugin below where the query is now "Automobiles" I am getting a 404 - Not found error. I don't know why my custom entity cannot be found. Any ideas why?

privateasyncTask<HttpResponseMessage> SendCrmRequestAsync(HttpMethod method, string query, Boolean formatted = false, int maxPageSize = 10)

{

HttpRequestMessage request = newHttpRequestMessage(method, query);

request.Headers.Add("Prefer", "odata.maxpagesize=" + maxPageSize.ToString());

if (formatted)

request.Headers.Add("Prefer","odata.include-annotations=OData.Community.Display.V1.FormattedValue");

returnawait httpClient.SendAsync(request);

}


Viewing all articles
Browse latest Browse all 82002

Latest Images

Trending Articles



Latest Images