cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Suchitra1996
Resolver II
Resolver II

CDS- send email using "Email" table and view attachments in PowerApps

Hi,

 

I'm trying to build an app where I wish to send an email with attachments using the "Email" table in Dataverse. 

In the next step, I want to be able to view all those attachments within PowerApps but it's giving me the below error:

Suchitra1996_0-1616411817298.png

 

I checked a few blogs where it said that the attachment files are usually linked and stored in "Notes" table. So I built a flow where I tried to send the content of those attachments in a new row in the "Notes" table. but this is also giving me errors. 

Suchitra1996_1-1616411928364.png

 

Can anyone please suggest a work around or how I will be able to achieve this.

 

Thanks.

 

1 ACCEPTED SOLUTION

Accepted Solutions
Mira_Ghaly
Dual Super User II
Dual Super User II

@Suchitra1996

It should be base64 not base64tobinary 

If this post helps you with your problem, please mark your as Accepted solution.If you like my response, please give it a Thumbs Up.

Visit my blog for nice articles: here

View solution in original post

12 REPLIES 12
Mira_Ghaly
Dual Super User II
Dual Super User II

@Suchitra1996

You need to pass base64 to the document property.

 

If this post helps you with your problem, please mark your as Accepted solution.If you like my response, please give it a Thumbs Up.

Visit my blog for nice articles: here
Mira_Ghaly
Dual Super User II
Dual Super User II

@Suchitra1996

If the base64 does not work please try using below and pass it to the document

{
“$content-type”: “image/png”,

“$content”:base64string

}

If this post helps you with your problem, please mark your as Accepted solution.If you like my response, please give it a Thumbs Up.

Visit my blog for nice articles: here
Suchitra1996
Resolver II
Resolver II

 @Mira_Ghaly

 

I already tried base64toBinary, that doesn't work as well. 

 

Suchitra1996_1-1616412416947.png

This is the output when I ran it with DataUritoBinary

 

 

Mira_Ghaly
Dual Super User II
Dual Super User II

@Suchitra1996

It should be base64 not base64tobinary 

If this post helps you with your problem, please mark your as Accepted solution.If you like my response, please give it a Thumbs Up.

Visit my blog for nice articles: here

View solution in original post

Mira_Ghaly
Dual Super User II
Dual Super User II

@Suchitra1996

What is the error u are getting from your flow or is it while opening the Note? 

If this post helps you with your problem, please mark your as Accepted solution.If you like my response, please give it a Thumbs Up.

Visit my blog for nice articles: here
Suchitra1996
Resolver II
Resolver II

okay, base64 solved the issue, now how do i access these files from powerapps? since i'm using the Email table. how do I link the attachments with a particular record and view it on PowerApps?

Mira_Ghaly
Dual Super User II
Dual Super User II

@Suchitra1996

To link notes with specific record you need to set the Regarding field to your parent record as below

/parentrecordschemanameinplural/Guid of parent record

 

If this post helps you with your problem, please mark your as Accepted solution.If you like my response, please give it a Thumbs Up.

Visit my blog for nice articles: here
Mira_Ghaly
Dual Super User II
Dual Super User II

@Suchitra1996

Is your parent record the email entity?

If yes then you need to use the method in the below article to add the attachment not through the notes.

So you need to follow below steps described in this blog post:

https://linnzawwin.blogspot.com/2020/05/send-email-from-dynamics-365cds-with.html?m=1

If this post helps you with your problem, please mark your as Accepted solution.If you like my response, please give it a Thumbs Up.

Visit my blog for nice articles: here
Suchitra1996
Resolver II
Resolver II

@Mira_Ghaly 

In my case, 

 

1. I'm sending the email from PowerApps using the Email table with attachments.

2. I want to be able to see those attachments in PowerApps.

 

how do you suggest we implement it step-by-step? or using which entity at which step.

Helpful resources

Announcements
PA 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

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

Top Solution Authors
Users online (58,136)