Skip to main content

Notifications

Microsoft Dynamics CRM (Archived)

Accessing entities attached files in plugin

Posted on by 205

Hi all,

I need a workflow that sends an email with the entity attached file/s when some state changes.

I'm thinking in programming a plugin, but I don't know how to access the attached files of an entity.

Any one has an example ??

Thanks in advance,


Mariano Minoli
Spain

*This post is locked for comments

  • Yaniv Arditi Profile Picture
    Yaniv Arditi 3,990 on at
    Re: Accessing entities attached files in plugin

    Hi Mariano,

    You can build a plug-in component that retrieves a file attachment from an CRM record on state change event.
    Keep in mind that attached files are related to entity annotations (notes) and not directly to the entity itself. An entity can have many annotations and therefor many attachments.
    Your solution should first query the records annotations for the requested attached file by the annotation attributes, file name or size and then use the documentbody property of the Annotation class to access the contents of the note's attachment.

    Check the Annotation Class reference in the SDK for information and examples.

    Hope this helps,

    Yaniv Arditi

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

New! Quick response templatesâš¡

Save time with the new custom templates!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,228 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,056 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans