web
You’re offline. This is a read only version of the page.
close
Skip to main content
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

I have the same question (0)
  • Yaniv Arditi Profile Picture
    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

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
Wayne Walton Profile Picture

Wayne Walton 2

#2
Good.Panos Profile Picture

Good.Panos 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans