locked
Get the all the annotations id from the CRM by C# Code RRS feed

  • Question

  • Hi All,

    I need to save all the attachments which are created on CRM onto my local drive. for this I am trying to write some C# code, I searched a lot but everywhere in that we need the Annotation-ID of the attachments.

    Please find my detail requirements.

    When anyone will run my code I should get all the Annotation Ids which is attached to any of the entity in the CRM, means Entity will be created manually in CRM only and by that code we should be able to download/Export  all the attachments of the entity into the local computer.

    Please help me in this , please.

    Regards

    R.S. Agrawal


    Raman Agrawal

    Monday, October 27, 2014 11:02 AM

All replies

  • You need the annotationId for each attachment, and you can get this using a QueryExpression on the annotation entity, then iterating through each entity that is returned.

    Your QueryExpression should include a ConditionExpression to only return records where isdocument = true

     

    Microsoft CRM MVP - http://mscrmuk.blogspot.com/ http://www.excitation.co.uk

    Monday, October 27, 2014 2:27 PM
    Moderator