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

Accessing entities attached files in plugin

(0) ShareShare
ReportReport
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
    3,990 on at

    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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
TNJ_CRM_Team Profile Picture

TNJ_CRM_Team 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans