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 :
Microsoft Dynamics CRM (Archived)

WebService C# - Read annotation from a case

(0) ShareShare
ReportReport
Posted on by

Hi all,

In my company I have a webservice to retrieve the information from CRM 2015 by Ticket Number, in particular only information from incidents. Now I must create a method to read the annotation from an incident but every code that I use don't work.
I'm not findig any information to this assosation between incident and annotation.

Any idea?

KR

Alessandro

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    a33ik Profile Picture
    84,331 Most Valuable Professional on at

    Hello,

    Try to use following code:

    var notesQuery = new QueryByAttribute("annotation")
    {
    ColumnSet = new ColumnSet(true)
    };
    notesQuery.AddAttributeValue("objectid", Guid.Empty);
    
    var notes = crmservice.RetrieveMultiple(notesQuery).Entities.ToList();
    


    In provided code replace Guid.Empty with Guid of your ticket (you will have to retrieve it before this operation) and crmservice with instance of your Crm Endpoint.

  • Community Member Profile Picture
    on at

    Hi Andrii,

    thanks for answer. the code suggested work  fine, but I don't succeed to show a specified key.

    for example I must retrieve the key number 6 (notetext), how can I retrieve this field?

    5670.Immagine.png

  • a33ik Profile Picture
    84,331 Most Valuable Professional on at

    Hello,

    You can use following approach (as a continuing of my previous code):

    foreach(var note in notes)

    {

    var notetext = note.GetAttributeValue<string>("notetext");

    }

  • Community Member Profile Picture
    on at

    Ok,

    this code can I use also for retrieve the attachment etc?

    thanks

  • Suggested answer
    a33ik Profile Picture
    84,331 Most Valuable Professional on at

    Check this article - parthimscrm.wordpress.com/.../read-annotation-file-contents-crm-2011-c

  • Community Member Profile Picture
    on at

    thanks,

    I created the new method as you suggested.

  • a33ik Profile Picture
    84,331 Most Valuable Professional on at

    Alessandro,

    Feel free to mark my replies as answers to close this thread.

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 > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans