When I try to execute the request to GET ../api/data/<version>/officedocuments
and at least 10 entities, I get an error:
{"error":{"code":"0x80040800","message":"The 'RetrieveMultiple' method does not support entities of type 'officedocument'."}}
The same problem I faced when I was trying to get full JSON of specific entity records
{"error":{"code":"0x80040800","message":"The 'Retrieve' method does not support entities of type 'roletemplate'."}}
Can someone suggest me how can I list all entity records for example for officedocument
entity and get full JSON for mentioned above roletemplate
records?
If its not allowed/supported means we cannot do it that way. So if you need that entity, then use the workaround of using web api with fetchxml.
https://crmdev.crm.dynamics.com/api/data/v9.1/roletemplates?fetchXml=<fetch> <entity name="roletemplate" > <attribute name="name" /> <attribute name="roletemplateid" /> </entity> </fetch>
Clear query is like below:
<fetch>
<entity name="roletemplate" >
<attribute name="name" />
<attribute name="roletemplateid" />
</entity>
</fetch>
Similarly, Workaround for that query is using ExecuteFetchRequest
//Try with IOrganizationService
var orgService = new OrganizationService(connection);
//Works
var orgSvcExecuteFetchResponse = (ExecuteFetchResponse)orgService.Execute(executeFetchReq);
//Doesn't work
var orgSvcRetrieveMultipleResponse = orgService.RetrieveMultiple(new FetchExpression(fetch));
//Try with CrmServiceClient:
var crmSvcClient = new CrmServiceClient(connectionString);
//Works
var crmSvcExecuteFetchResponse = crmSvcClient.Execute(executeFetchReq);
//Doesn't work
var crmSvcRetrieveMultipleResponse = crmSvcClient.RetrieveMultiple(new FetchExpression(fetch));
List of RetrieveMultiple supported entities can be found here.