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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Clean up Workflow History

(0) ShareShare
ReportReport
Posted on by 80

Hi,

I would like to know if there is a way to clean up the Workflow History, because the table WorkflowTrackingTable has 3 Gb and WorkflowTrackingCommentTable has 2 Gb in the DB.

Thank you

*This post is locked for comments

I have the same question (0)
  • Community Member Profile Picture
    on at

    Hello,

    Have you ever got an answer on this? We're facing a problem in our TEST and DEV environments where the workflow tables are bloated with rows of useless information. The workflow history form can not be opened because it freezes.

    Tried to do a delete directly on the WorkflowTrakingStatusTable and it hangs forever.

    Regards,

    Eric

  • Community Member Profile Picture
    on at

    Hi,

    There is no standard process that meets this need but I think that you can delete WorkflowTrackingStatusTable table, but with conditions.

    You can not delete records with TrackingStatus 'Pending' or 'Cancelled'. This table has a type cascade DeleteAction with WorkflowTrackingTable table, and WorkflowTrackingTable too with WorkflowTrackingCommentTable table.

  • Suggested answer
    Dick Wenning Profile Picture
    8,705 Moderator on at

    use command like this

    delete_from WorkflowTrackingStatusTable where WorkflowTrackingStatusTable.TrackingStatus == WorkflowTrackingStatus::Completed &&

       WorkflowTrackingStatusTable.WorkflowType == WorkflowTrackingStatusWorkflowType::Workflow && WorkflowTrackingStatusTable.modifiedDateTime < DateTimeUtil::addMonths(DateTimeUtil::utcNow(),-3);

    delete_from WorkflowTrackingStatusTable where WorkflowTrackingStatusTable.TrackingStatus == WorkflowTrackingStatus::Cancelled &&

       WorkflowTrackingStatusTable.WorkflowType == WorkflowTrackingStatusWorkflowType::Workflow && WorkflowTrackingStatusTable.modifiedDateTime < DateTimeUtil::addMonths(DateTimeUtil::utcNow(),-3);

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans