cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
LauraWare
Advocate I
Advocate I

Creating a new Email Attachment in Dynamics 365

I am having a hard time creating a new attachment in Dynamics 365 for Emails.   When a gmail email arrives, I am creating a new Email Activity type record in Dyanmics 365.  That is working perfect.  When I create the attachment from the email, the settings dont look right.  There is nowhere to add the contents of the attachment, the file name, etc.  Please assist in telling me how to fill out that Create a new Dynamics 365 Attachment to my email?

 

 

Capture.PNG

 

5 REPLIES 5
v-yuazh-msft
Community Support
Community Support

Hi @ LauraWare,

 

I have made a test on my side, there are two same entities name “Attachments” in the “Create a new record” action, and the screenshot you have share is the second one, if we choose the first one, we could fill the attachment content in the “”Body” field, and fill the attachment name in the “File Name” field.

1.png

But when submit the flow, the flow would run fail with error “The 'Create' method does not support entities of type 'attachment'.

 

Create a new record in Dynamic 365 don’t support entities of type 'attachment' in Microsoft Flow currently.

If you would like this feature to be added in Microsoft Flow, please submit an idea to Flow Ideas Forum:

https://powerusers.microsoft.com/t5/Flow-Ideas/idb-p/FlowIdeas

 

Regards,
Alice Zhang

Correct, I get the same error.

 

I will submit it to the Flow Ideas Forum.

 

Thank you,
Laura

This type of issue makes me really upset, total lack of quality assurance from Microsoft.  Why claiming we can interact with Dynamics 365, but yet, a basic use cases such as adding an attachment to an email entity is not supported, but being exposed in Flow UI?

 

Because, this obvious "gap",  I cannot roll out this new automated process until then via flow...  I have to explain to my customers that the intial plan and deadline cannot be met anymore....

 

Frustrating...

SimonNie
Advocate I
Advocate I

At least with Azure logic app I found a workaround by hacking the connector in the code view.

You create a new record of type ActivityMimeAttachment.

What you are missing there is body, filename and mimetype in the Logic App Connector. But those missing elements you can add using the Code View of the Logic App.

 

Just add the following lines in the right place in your code view and you will get the missing fields for Dynamics available (see screenshots):

"body": "",
"filename": "",
"mimetype": "",

 

SimonNie_0-1572354927349.png

 

SimonNie_2-1572355142451.png

 

 

The remaining issue is, that the connector requires you to fill out the field "_attachmentid_value" in order to save your flow in design view. You can remove the value and successfully save in the code view (see screenshot). But after you remove the required value in the code view you are not able to save the graphical design view anymore. For that I helped myself by creating a Sub-Logic App only doing the attachment step, that i only save in code view. (Google nested Logic Apps for more info on how to call nested logic apps)

 

**bleep**ty, but it works. Please Mircosoft, do something about that.

LinnZawWin
Kudo Commander
Kudo Commander

This is now possible with a combination of the CDS connector and CDS (current environment) connector to create the Attachment (ActivityMimeAttachment) for the Email record.

 

I've written a blog post about it.
http://linnzawwin.blogspot.com/2020/05/send-email-from-dynamics-365cds-with.html

Helpful resources

Announcements
MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

Top Solution Authors
Users online (46,835)