Skip to main content

Notifications

Microsoft Dynamics CRM (Archived)

Delete Activities from Dynamics 365

Posted on by 15

I want to remove completed activities from system 

5516.picture.png

I want to remove all activities ModifiedOn (Last updated) 1/17/2019 as shown in image, Activity type is Case Resolution but not understanding how to Advance find or remove (delete).

*This post is locked for comments

  • Suggested answer
    DavidG1234 Profile Picture
    DavidG1234 35 on at
    RE: Delete Activities from Dynamics 365

    This is a pretty old topic, but I was facing a very similar problem and found a way to use PowerAutomate to bulk delete activities.  This seemed to be pretty useful because the OOB Bulk Deletion tool does not allow one to select Activities or some of the types of Activities (you can choose Email for example, but you can't choose Case Resolution or Quote Close)

    You can use Advanced Find to build your query, Download the fetch xml from the saved view, open in a text editor, and then paste that query into the List Rows step

    pastedimage1638561358137v1.png

    pastedimage1638561372889v2.png

  • Suggested answer
    Ivan Burda Profile Picture
    Ivan Burda 115 on at
    RE: Delete Activities from Dynamics 365

    Are you sure that type of that activity you want to delete is activity type "Case Resolution"?

    If it is? Check Value on form for Activity Type field for Case Resolution.

    And delete it from base like this

    delete from dbo.ActivityBase

    where activitytypecode = '4206' and

    modifiedon = '1/17/2019';

    p.s. Use first 'select *' instead of 'delete' to see all rows that you will delete with delete from statement

  • Suggested answer
    Kokulan Profile Picture
    Kokulan 18,048 on at
    RE: Delete Activities from Dynamics 365

    Advance Find does not list Case Resolution as an activity. But you can get to it by selecting Activity and filtering it to show only Case Resolution type activities

    Please see below. 

    3463.ScreenClip-_5B00_181_5D00_.png

    Once you are happy with the advance find results, then click on Download Fetch XML button and use the query in the Xrm toolbox plugin i mentioned in my previous post above to delete all of them.

  • kashiffayyaz Profile Picture
    kashiffayyaz 15 on at
    RE: Delete Activities from Dynamics 365

    Dears, actually my problem is i can't find entity "Case Resolution" in Advance find or SQL or in bulk delete. When i open account i can see related activities when i open specific activity it opens and activity name is Case Resolution , my question is how can i find Case Resolution entity. If i go to advance find it bring all activities(Phone, email etc) i want to open activities with type Case Resolution. In Advance Find under activities i don't get any Activity type with name Case resolution.

  • Suggested answer
    Ivan Burda Profile Picture
    Ivan Burda 115 on at
    RE: Delete Activities from Dynamics 365

    You can also delete with MS SQL if u know how.

    That way you can delete much more within seconds.

    I'm not recommending doing that if you are not familiar with SQL Queries.

  • Suggested answer
    gdas Profile Picture
    gdas 50,085 on at
    RE: Delete Activities from Dynamics 365

    My personal thought is to delete from Advanced find , 5000 data is not so big amount . You can set record per page "250" by going to settings --> Under General Tab . Once you done delete from advanced find its not take more than 30 mins.

  • Suggested answer
    Kokulan Profile Picture
    Kokulan 18,048 on at
    RE: Delete Activities from Dynamics 365

    Hi

    Out of the Box Bulk Delete does not support deleting Case Resolution Activity.

    if my above mentioned Advance Find approach is not suitable because of large number of records, you could use the following approach.

    You cant use workflow to delete because workflow does not support Delete step unless we have custom workflow activity to  do so.

    I would say you build your FETCH query using Advance find and then use the XRMToolBox (https://www.xrmtoolbox.com/) Bulk Delete Tool plugin mentioned below to delete

    ScreenClip-_5B00_169_5D00_.png

    Hope this helps

  • Suggested answer
    Dynamics365 Rocker Profile Picture
    Dynamics365 Rocker 7,755 on at
    RE: Delete Activities from Dynamics 365

    You Can do it from bulk deletion.

  • kashiffayyaz Profile Picture
    kashiffayyaz 15 on at
    RE: Delete Activities from Dynamics 365

    This will work for single or few entities to delete, i want to delete more then 5000 activites (Case Resolution) i need bulk deletion or i want to create a job

  • kashiffayyaz Profile Picture
    kashiffayyaz 15 on at
    RE: Delete Activities from Dynamics 365

    If i have only one activity to delete, this will work, but i want to delete 6000 Case Resolution Activites

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,240 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans