Showing results for 
Search instead for 
Did you mean: 
Regular Visitor

Bulk delete opportunity close activities

I want to delete Opportunity Close Activities that are older than 6 years. I've created the flow for this and it says it suceeeds, but I dont see that the activities are being deleted. 


What am I doing wrong? The condition is set to CreatedOn is greater than or equal to 




Dual Super User III
Dual Super User III

Hey @nicole-dynamics 


In the condition, use the function ticks to compare the time. 


e.g., In the condition on the left input, click on expressions from the dynamic selector, type "ticks()" and in the bracket select the created on field from the dynamic content selector. Similarly wrap the subtract time function in  the ticks() function. 


Hope this Helps!

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

So like this





ticks('createdon') is greater than or equal to 
Note: when I put the expression in the first left box, nothing comes up for the dynamic content so I just entered Createdon. 



Hi @nicole-dynamics 


The created on will not work that way. Waht you can do is in the left input just select created on from the dynamic selector. Now tap into the left input box and select all (Ctrl A) and copy using ctrl c, now remove this and go to the expressions and type ticks() and paste the content within the bracket. from the content remove the '@' and any curly braces. 



And then what goes into the right input box of the condition?

Hey @nicole-dynamics  it will be ticks(subtract....).


The subtract function you already have wrapped inside of the ticks function.

Thank you for all of your assistance. I see that the flow succeeds but I dont actually see that it is deleting records based on the query I am doing in Dynamics CRM to validate. 





Can you share a screenshot of the condition action from your flow?




Left input box :

Right input box:

Hi @nicole-dynamics  


I see a balnk condition branch in the flow. Can you please delete that and try again?






That is included by default and can not be removed. I have other flows where it is blank and it does not impact the flow.

Super User III
Super User III

Hi @nicole-dynamics ,


Yes I can see there are 512 records fetched for delete.


Try Settings of 'Apply to each' and set it execute in sequential. Lets see whether that works or not.



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

Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Top Solution Authors
Top Kudoed Authors
Users online (16,002)