web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

D365 F&O Workflow History Cleanup

(4) ShareShare
ReportReport
Posted on by 106
Hi,
 
We have an extensive amount of workflow history (almost 3 years worth) and would like to know if there is a way to clean these up to free up space.
 
Any suggestions will be highly appreciated.
 
Thanks,
Tristan
I have the same question (0)
  • Verified answer
    Adis Profile Picture
    6,793 Super User 2026 Season 1 on at
    Hey,
     
    I didnt find any periodic job that would do that. We also have a history worth over 3 years, however, the space is okay ~2,5GB. 
     
    Did you check in PPAC or somewhere else how big the table(s) are?
     
    If needed you can create a class that deletes the table and then create a batch job to execute the class.
     

    Kind regards, Adis

     

    If this helped, please mark it as "Verified" for others facing the same issue

    Keep in mind that it is possible to mark more than one answer as verified

  • Verified answer
    André Arnaud de Calavon Profile Picture
    305,265 Super User 2026 Season 1 on at
    Hi Tristan,
     
    Unfortunately, at this moment there is no cleanup job available. It can cause some database growth, I do agree with you. I notified Microsoft about missing cleanup jobs before. You can upvote the next idea to let Microsoft know about priority: Microsoft Idea
  • Verified answer
    Navneeth Nagrajan Profile Picture
    2,618 Super User 2026 Season 1 on at
    Hi Tristan,
     
    As Andre mentioned there are no standard jobs available in D365 FO for workflow history cleanup. Also, didn't see any out of the box jobs for data archival except for some data archival classes like SourceDocumentArchiveAutomationJobRequestCreater. This does consider some of the actively running workflows.
     
    Additionally, through custom code extension of class SourceDocumentArchiveAutomationJobRequestCreater, the tables WorkflowTrackingStatusTable, WorkflowTrackingTable, WorkflowWorkItemTable, WorkflowTrackingWorkItem tables can be considered for data archival. If the workflow history needs to be cleaned up completely without any backup archival history reference then you can consider cleaning up data from the workflow tables highlighted in bold.
     
     
    References:
     
    Hope this helps. 
  • Jonas "Jones" Melgaard Profile Picture
    5,016 Most Valuable Professional on at
    Hi Tristan,
     
    You have gotten good suggestions on how to solve this, and this reply does not provide an answer your question. You might also have discussed this already.
     
    Before you delete the workflow history, you need to discuss this with either your own or your customer's auditor, as the workflow history might be part of the material you need to keep as part of your audit trail in some legal entities.
     
    An example from the Danish bookkeeping law (Bogføringsloven), where it's our accountants understanding of the law, that you have to keep the audit trail (Kontrolsporet) for at least the current fiscal year + 5 years, and the workflow history for some document types IS part this audit trail: https://erhvervsstyrelsen.dk/vejledning-bogfoeringsloven#chapter5-3 
  • Tristan Thor Profile Picture
    106 on at
    Thanks everyone for your responses.  It's quite a shame Microsoft hasn't provided any tool/jobs available until now considering that this looks like it can be a problem long-term wise.
     
    We're looking into Dartaverse soon and may consider using PowerApps to automate archiving or removal of these unneeded data. 
     
    Thanks again!
    Tristan  

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 591

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 550 Super User 2026 Season 1

#3
Abhilash Warrier Profile Picture

Abhilash Warrier 543 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans