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)

Saved attachments

(0) ShareShare
ReportReport
Posted on by 186

Hello guys


Where can I find the attachment files from emails on the file share or database? I want to export them automatically, is this possible?

I just found a download.aspx file in the CRMWeb folder.

Regards

Raphi

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Rajkumar Rajaraman Profile Picture
    on at

    Hi Raphi,

    Yes, the attachments are stored inside the "Annotation" entity and "documentbody" as field.

    Hope this helps.

    Regards,

    R.Rajkumar

    "Please mark my answer as verified if you found it helpful"

  • Rajkumar Rajaraman Profile Picture
    on at

    Refer this link:

    woodsworkblog.wordpress.com/.../exporting-annotation-note-attachment

  • Suggested answer
    Mahendar Pal Profile Picture
    45,095 on at

    Hello,

    It is stored in annotation entity, check this sample it will help you to download attachment using SDK.

    msdn.microsoft.com/.../gg328429.aspx

  • Raphi Profile Picture
    186 on at

    Hello

    Thanks for your answers.

    I am able to download the attachment with the link "crm.tld/.../download.aspx;AttachmentId=7a1ad0be-c8f3-e411-9439-00155d011304&CRMWRPCToken=DrGw9N%2bVEeSUOAAVXQETBAaaAgf/qXY8gsH7czyO06p3GKgwrn5F7faU92Glz1Lc&CRMWRPCTokenTimeStamp=635665175545604662"

    I am not able to create a plugin, I have to do it with Javascript and PHP (--> ajax).

    I fire an OnLoad event in the email entity and read the img-Tags from the "description" field, but I get the link you see above. Is it possible to get the "real" image link or download this to a local folder?

  • Suggested answer
    Aileen Gusni Profile Picture
    44,524 on at

    Raphi,

    If it is an email, then would be stored in the : ActivityMimeAttachment  entity

    https://msdn.microsoft.com/en-us/library/gg334229.aspx

    https://msdn.microsoft.com/en-us/library/gg309364.aspx

    https://msdn.microsoft.com/en-us/library/gg328344.aspx

    Thanks.

  • Raphi Profile Picture
    186 on at

    Hi Aileen

    Yes, thank you.

    Is it possible to "export" the attachment or get the "real" link when I have the record Id (with javascript or php)?

    BR

  • Raphi Profile Picture
    186 on at

    No one?

  • Suggested answer
    Community Member Profile Picture
    on at

    Hello Raphi,

    You can develop a custom workflow to download attachments on email creation using following code.

    QueryExpression query = new QueryExpression { EntityName = "activitymimeattachment" };

    query.Criteria.AddCondition("activityid", ConditionOperator.Equal, eGuid);

    //eGuid here is the PrimaryEntityId that comes from workflow.

    query.ColumnSet = new ColumnSet("activitymimeattachmentid");

    EntityCollection collection = service.RetrieveMultiple(query);

    if (collection.Entities.Count > 0)

    {

    }

    Then you can download them easily. Hope this helps.

    Regards,

    Burak

  • Raphi Profile Picture
    186 on at

    Thanks but that is not what I am looking for.

    I want to change the src of an image in the email reply form, so I have to download the image(s) automatically from the description field (I already have this, but I cannot download it, because the link is not a "real" *.jpg link).

  • Aileen Gusni Profile Picture
    44,524 on at

    Raphi,

    You did save the attachment?

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
JS-09031509-0 Profile Picture

JS-09031509-0 3

#2
AS-17030037-0 Profile Picture

AS-17030037-0 2

#2
Mark Eckert Profile Picture

Mark Eckert 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans