cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Ancy
Kudo Kingpin
Kudo Kingpin

How to attach camera image from PowerApp to Notes entity in Dynamics 365?

I want to save the image taken from the camera control in PowerApp in the Notes entity of Dynamics crm 365.

 

For this I have taken help of: https://www.techmikael.com/2017/05/an-even-more-clever-workaround-for.html 

 

In the compose action of the flow I have formula:-

"@base64ToBinary(replace(triggerBody()['Createfile_FileContent'],'data:image/jpeg;base64,',''))"

 

The notes entity record is getting created with image as attachment. But I am getting below error when opening the image:-

"The input is not a valid Base-64 string as it contains a non-base 64 character, more than two padding characters, or an illegal character among the padding characters."

 

Please help.

1 REPLY 1
v-xida-msft
Community Support
Community Support

Hi @Ancy,

Could you please share a bit more about your scenario?

Do you want to pass an image captured via Camera control (within an app) to a flow, then attach it to Notes entity record?

I think there is something issue with the base64ToBinary() function within the formula that you mentioned. Please take a try with the dataUriToBinary() function instead of  base64ToBinary() function, then check if the issue is solved.

Please type the following formula within the Inputs field of the "Compose" action:

"@dataUriToBinary(triggerBody()['Createfile_FileContent'])"

then check if the issue is solved.

Please also check the following blog for more details:

http://johnliu.net/blog/2017/5/taking-a-picture-with-powerapps-and-sending-to-sharepoint-with-just-f...

 

Best regards,

Kris

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Top Solution Authors
Top Kudoed Authors
Users online (4,345)