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 II
Dual Super User II

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 blogPower Automate Video Tutorials

Helpful resources

MPA 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


Experience what’s next for Power Virtual Agents

See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.

New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Top Solution Authors
Users online (32,365)