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 :
Customer experience | Sales, Customer Insights,...
Unanswered

How to Query annotation table?

(0) ShareShare
ReportReport
Posted on by 60

Hi, in annotation entity I query the notes(annotation) table,  when I include documentbody field that holds documents Base64 I get 504 bad gateway from dynamics service.

  
    
    
  

or By Odata https://mycrm.crm.dynamics.com/api/data/v9.2/annotations?$select=annotationid,documentbody
pastedimage1625788940376v1.png

or or by FetchXml

pastedimage1625791496194v3.png

there are more 10,000 records in the table, I think that query should return 5000 and a cookie doesn't it?.

is it normal to crash?
thanks.

I have the same question (0)
  • Hari Narayanan Profile Picture
    589 on at

    Did you try to reduce the number of records in the fetch?

    Probable cause is the size of response is high or any custom plugins on retrieve of records

  • Community Member Profile Picture
    on at

    Hi,

    Try to write your FetchXml with some specific filtration like below:

    <fetch no-lock="true" >

     <entity name="annotation" >

       <attribute name="documentbody" />

       <filter>

         <condition attribute="documentbody" operator="not-null" />

         <condition attribute="objectid" operator="eq" value="<Put GUID>" />

       </filter>

     </entity>

    </fetch>

    put any value in objectid field which related to your notes, and wait for the result

  • Esteban Coto Alfaro Profile Picture
    Microsoft Employee on at

    Hello, you need first to convert the documentbody from Base64 to string. Have you tried to do this query with C#?

    Thanks!

    Community Support Team - Esteban

    If this Post helps, then please consider Accept as solution to help the other members find it more quickly.

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 > Customer experience | Sales, Customer Insights, CRM

#1
ManoVerse Profile Picture

ManoVerse 184 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 125

#3
CU11031447-0 Profile Picture

CU11031447-0 100

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans