cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
David_Pezzoli
Kudo Collector
Kudo Collector

MS Dataverse How to delete image field row with Power Automate

Hi all,

I want to delete, automatically with a Power Automate flow, the image file content  attached to the Image field on my Dataverse QuoteDetail form:

2022-04-13 10_35_39-OneNote for Windows 10.png

I try with Dataverse unbound action "DeleteFile" as mentioned in these following links:

Solved: Deleting image/file from CDS image/file field with... - Power Platform Community (microsoft....

https://linnzawwin.blogspot.com/2020/09/move-attachment-from-file-field-of.html#InitializeVariables

 

David_Pezzoli_1-1649839451395.png

David_Pezzoli_2-1649839529280.png

 

 

But the action step "DeleteFile" occur this error 'fileattachment With Id = '...GUID value...' Does Not Exist"'.

I passed to the action step the file Id ("ft_img_prodottoid" attribute) but the action always occurs the error above.

How can I delete the content of the image field using Power Automate cloud flow, please??

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
abm
Super User
Super User

Hi @David_Pezzoli 

 

I made a tutorial video about this

 

Please have a look

 

https://youtu.be/WZRE0o4-pH8

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog
Power Automate Video Tutorials

View solution in original post

14 REPLIES 14
v-xiaochen-msft
Community Support
Community Support

Hi @David_Pezzoli ,

 

What's your trigger?

Could you click the flow run history and check the value of ft_img_prodottoid?

In your ft_img_prodottoid field , does this value exist?

 

Best Regards,

Wearsky

abm
Super User
Super User

Hi @David_Pezzoli 

 

Its a look up value so that contains the logic name and GUID. To get the GUID try the below

 

triggerOutputs()?['body/_ft_img_prodottoid_value']

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog
Power Automate Video Tutorials

My Trigger is Create & Update of Quote Product row (quotedetail)

About history:

David_Pezzoli_1-1650026513316.png

 

 

David_Pezzoli_0-1650026465603.png

 

In ft_img_prodottoid field exists a GUID value

 

Hi @David_Pezzoli 

 

Thanks for your update. Could you go to CRM record and right click the lookup and open in a new window. Compare the Id from the url and run history.

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog
Power Automate Video Tutorials

Hi @abm ,

it isn't a Lookup field because:

  • ft_img_prodotto is a image type field
  • There is no _ft_img_prodottoid_value in JSON OData structure but only:

e.g.

"ft_img_prodotto": "iVBORw0KGgoAAAANSUhEUgAAAIoAAACKCAYAAAB1h9JkAAAAAXNSR0IArs4c6.........."
"ft_img_prodottoid": "dc5e9d1f-10bc-ec11-983f-000d3a659931"

 

"ft_img_prodotto_url": "/Image/download.aspx?Entity=quotedetail&Attribute=ft_img_prodotto&Id=d85e9d1f-10bc-ec11-983f-000d3a659931&Timestamp=637855506063018377"
"ft_img_prodotto_timestamp": 637855506063018400

 

Hi   

 

 

Above id you are passing and it is getting the error. 

 

Could you pass this id below and see

 

d85e9d1f-10bc-ec11-983f-000d3a659931

.

Hardcode the value and test it. 

image.png

@David_Pezzoli



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog
Power Automate Video Tutorials

Hi, After pass 

d85e9d1f-10bc-ec11-983f-000d3a659931

Occur Same error: fileattachment With Id = d85e9d1f-10bc-ec11-983f-000d3a659931 Does Not Exist

 

David_Pezzoli_0-1650027747578.png

 

David_Pezzoli_0-1650028139380.png

 

Hi @David_Pezzoli 

 

I have some answers for you. I did a quick test now.

 

If you have a file type then you can delete using the Ubound action step. In your case you have image data type which is stored in Azure blob storage. You can't directly delete via the connector. You need to use the HTTP API to delete the record.  Documentation doesn't says about delete. I will have a look on this and update you soon.

 

Image columns (Microsoft Dataverse) - Power Apps | Microsoft Docs

 

Thanks

 

 

 

 



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog
Power Automate Video Tutorials
abm
Super User
Super User

Hi @David_Pezzoli 

 

I made a tutorial video about this

 

Please have a look

 

https://youtu.be/WZRE0o4-pH8

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog
Power Automate Video Tutorials

Wow! Very grateful for the video and the help!  Thanks for your time @abm 

The steps in your tutorial do not work. The file is never found when using the DeleteFile unbound action.

GringoInMiami
Advocate II
Advocate II

Same problem here. And none of the proposed solutions in this thread work.

Hi @GringoInMiami 

 

Most likely your mapping is not quite and thats the reason file is never found. If you could post a screenshot of your flow I could look into this.

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog
Power Automate Video Tutorials

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Kudoed Authors
Users online (3,704)