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

Notifications

Announcements

No record found.

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
    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

Responsible AI policies

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

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 170 Super User 2025 Season 2

#2
#ManoVerse Profile Picture

#ManoVerse 70

#3
Jimmy Passeti Profile Picture

Jimmy Passeti 50 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans