DEV Community

Nikhil Sarpatwari
Nikhil Sarpatwari

Posted on

Automate Plugin Trace Logs & System Jobs Cleanup in Microsoft Dynamics CE

Managing Plugin Trace Logs and System Jobs is often overlooked, but these can silently consume storage capacity and impact system performance.

Based on my previous experiences, there are two ways to automate the cleanup:

✅ Bulk Delete Jobs (OOTB feature) – Easy to set up with scheduled recurring jobs.

○ Add Filters like:
Created On older than X days.
Status: Completed, Succeeded, or Failed.

○ Set the Recurrence Schedule (daily, weekly, or custom).

⚙️ Power Automate Flows – Ideal for custom filtering or advanced logic but consumes API calls.

○ Set recurrence to your desired interval.

○ Add List Rows (Dataverse) action.

Table Name: plugintracelog or asyncoperation (System Jobs)

○ Filter Query: createdon lt @addDays(utcNow(), -30) (Older than 30 days)

○ Add Apply to Each action.

Inside, add Delete Row (Dataverse) action.

Setting up regular cleanups can:

✅️ Free up storage & log capacity

✅️ Improve system performance

✅️ Lower licensing costs

💡 Tip: Use Bulk Delete Jobs for standard cleanup and Power Automate for custom scenarios.

Small automation, big impact!

Hostinger image

Get n8n VPS hosting 3x cheaper than a cloud solution

Get fast, easy, secure n8n VPS hosting from $4.99/mo at Hostinger. Automate any workflow using a pre-installed n8n application and no-code customization.

Start now

Top comments (0)

AWS Security LIVE!

Join us for AWS Security LIVE!

Discover the future of cloud security. Tune in live for trends, tips, and solutions from AWS and AWS Partners.

Learn More

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay