cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Rob_CTL
Level: Powered On

When an Item is deleted trigger - Saving a copy of the item to another list?

Hi,


This might be an odd ball question, I need to have a full audit trail of items within a list particularly item deletes.  What I'd like to do is when a user deletes an item a copy of that item is stored in another "secure" list.  The flow is triggered by the "When an item is deleted" trigger.  The next action is "Get Item" where I am trying to grab the detail of the item and then using "Create Item" creating the deleted item in another list.

 

flowdelete.png

 

The flow stops at the second action with a 404 which I guess kinda makes sense as the item is deleted....

 

flow404.png

 

Any thoughts/help gratefully received.

 

Rob

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: When an Item is deleted trigger - Saving a copy of the item to another list?

Hi Rob,

 

Flow triggers after the item is deleted. It only give the below information.

 

{
"ID": 2,
"Name": "Title2",
"FileNameWithExtension": "Title2",
"DeletedByUserName": "Mark",
"TimeDeleted": "2019-12-12T23:04:15Z",
"IsFolder": false
}
 
So in your case Get Item cannot find the details because the item is already deleted hence you getting 404 item not found.
 
Another work around I can think is add a flag called Delete Y/N. Trigger against this field update. Move the item details across another list then delete the item via flow action. Also you need to set some securities around where users can't delete the list items.
 
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!



View solution in original post

3 REPLIES 3
Super User
Super User

Re: When an Item is deleted trigger - Saving a copy of the item to another list?

Hi Rob,

 

Flow triggers after the item is deleted. It only give the below information.

 

{
"ID": 2,
"Name": "Title2",
"FileNameWithExtension": "Title2",
"DeletedByUserName": "Mark",
"TimeDeleted": "2019-12-12T23:04:15Z",
"IsFolder": false
}
 
So in your case Get Item cannot find the details because the item is already deleted hence you getting 404 item not found.
 
Another work around I can think is add a flag called Delete Y/N. Trigger against this field update. Move the item details across another list then delete the item via flow action. Also you need to set some securities around where users can't delete the list items.
 
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!



View solution in original post

Community Support Team
Community Support Team

Re: When an Item is deleted trigger - Saving a copy of the item to another list?

Hi @Rob_CTL ,

 

As @abm said, you couldn't get the content of the item when the item is deleted.

 

Best regards,

Alice       

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

Rob_CTL
Level: Powered On

Re: When an Item is deleted trigger - Saving a copy of the item to another list?

Thanks @abm that is what suspected would be the case.  

Helpful resources

Announcements
firstImage

Power Platform Online Conference

Speakers, submit your sessions now! Call for speakers ends Feb. 10!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (5,711)