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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Microsoft Dynamics 365 | Integration, Dataverse...
Suggested Answer

Incidents-RetrieveMultiple/WebApiFetch for one user is slow

(0) ShareShare
ReportReport
Posted on by 311

Hello,

we are using CRM 2016/365 OnPrem. RetrieveMultiple for specific user of incidents via SDK or via WebAPI is very slow. E.g.15- 25 seconds. The same for other entities for the same user or for incidents with other user credentials ist much quicker . It takes 1-2 seconds.

Access is made via WebApi (https:/servername/orgname/api/data/v8.2/incidents?$top=11 )or via small code sample:

             var req = new QueryExpression("incident");
            req.ColumnSet = new ColumnSet(true);
            req.TopCount = new Random().Next(5, 100);
            var time1 = DateTime.Now;
            var ec = client.RetrieveMultiple(req);
            var duration = DateTime.Now - time1;

(Randomisation is adder to the code sample because without randomization it runs quickly - probably because of cacheing, but that is not what I need.  Also it runns quick  when the "top" parameter in the WebAPI url is not changed for every query.)

About my system:

  • Access through Browser to Incident-Views and AdvancedFind of incidents is quick for the user.
  • The structure of BusinessUnits is very simple (no subordinated BUs).
  • The user has only two roles which are failry simple. One of them grants full access to Incidents in the same BU and subordinated BUs.
  • There are no RetrieveMultiple-SdkProcessingSteps.
  • POA table doesn't contain record for Incidents for specific user (it has only two rows for the user)

Already tried:

  • adding some new rolle to the user in Order to have eventally used Security-Cacheing/POA recalculated.
  • Adding sysadmin role helps, but this is not what I want.
  • updating RecentlyViewedXml field in the UserEntityUISettingsBase (Update UserEntityUISettingsBase set RecentlyViewedXml = null where ownerid ='xxx' and objecttypecode =112) and deleting the record in the UserEntityUISettingsBase. But it didn't help.
I have the same question (0)
  • Suggested answer
    Nikica Profile Picture
    311 on at

    Well it looks like fetching all columns makes Retrieve so slow. Incident has like 400 attributes, 70 lookups. When all fetched - it takes 15-25 seconds. Wenn only 10-20 it is very fast. 

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Microsoft Dynamics 365 | Integration, Dataverse, and general topics

#1
BillurSamdancioglu Profile Picture

BillurSamdancioglu 95 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 80 Super User 2025 Season 2

#3
Abhilash Warrier Profile Picture

Abhilash Warrier 55 Super User 2025 Season 2

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans