Skip to main content

Ghost Issue in Dynamics 365 CRM / CE / Dataverse - The Workflow That Was “Inactive”… But Still Executed

You do everything right.

You open Classic Workflow.
You hit Deactivate.
Status shows Draft / Inactive.

Perfect.

You deploy the solution to Test.
You breathe.

Then…

📩 A record updates.
📩 An email gets sent.
📩 A task gets created.

And you just sit there like:

“Wait… who triggered this?”

Because the workflow is inactive.
It should not run.
Yet somehow… it did.

No errors.
No warnings.
Just business logic happening behind your back.


😵 The Usual Developer Rituals

So naturally you start debugging like a normal human:

Publish all customizations
Refresh browser
Clear cache
Re-import solution
Check the workflow again (inactive, confirmed)

Still… it happens.

At this point, you’re not troubleshooting anymore.

You’re negotiating with the platform.


The Real Reason (and it’s annoying)

Here’s the truth:

Dataverse doesn’t “cancel time”.

If the workflow triggered before you deactivated it, the job may already be sitting inside the system queue.

Meaning:

📌 The workflow is inactive now
…but the System Job was already created earlier.

So even after deactivation, Dataverse still executes the queued async job because:

the workflow execution was already scheduled when it was active.


🧩 Where the Ghost Actually Lives

Not inside the workflow.

It lives here:

Settings → System Jobs

(or Advanced Settings → System Jobs)

You’ll find entries like:

  • Waiting
  • In Progress
  • Ready
  • Retrying

And those jobs don’t care that you deactivated the workflow.

They already have a mission.


💥 Why This Creates Chaos in Deployment

This becomes dangerous in real projects because:

  • You deploy a fix to QA
  • You deactivate old automation
  • QA still sees old behavior
  • Everyone assumes deployment failed
  • You re-import multiple times
  • Now you’ve got duplicate logic

And the real culprit?

A queue that was created hours ago.


How to Diagnose It Properly

Next time you see this:

Step 1: Find the workflow

Open the workflow record and check:

➡️ Process Session / System Jobs

Step 2: Look for jobs created BEFORE deactivation

Check “Created On” timestamps.

If jobs were generated while workflow was active, they’ll continue running.


🛠️ Fix Options (Realistic Ones)

Fix 1: Cancel Waiting Jobs

Go to System Jobs and cancel jobs in:

  • Waiting
  • Ready
  • In Progress (if possible)

This stops the execution chain.


Fix 2: Stop Recurring Triggers

If workflow is triggered by record updates, check if something else is still updating records and triggering jobs.

Sometimes the workflow isn’t running…
it’s just cleaning up jobs already spawned.


Fix 3: Replace With a New Workflow (if needed)

If you’re changing logic heavily, it’s often safer to:

  • create new workflow
  • activate new one
  • deactivate old one
  • cancel pending jobs

Because patching an old process can create confusion.


🧠 Architect-Level Lesson

Deactivating a workflow only stops future triggers.

It does not erase the past.

Dataverse is basically saying:

“I won’t create new jobs.
But I will finish what I already started.”


🔥 Best Prevention Strategy (for real projects)

Before deploying workflow changes to QA/UAT:

Always check System Jobs
Cancel pending jobs for that workflow
Communicate to testers: Old async jobs may still complete
Avoid using workflows for logic that must stop instantly


So the next time someone says:

“But the workflow is inactive, it can’t run…”

Just smile.

Because you know the truth:

📌 The workflow isn’t running. The queue is.

Comments

Popular posts from this blog

Automation using Azure DevOps for Dynamics 365 CE / CRM / Dataverse

In enterprise Dynamics 365 CE / CRM / Dataverse projects, manual deployments create long-term problems such as: inconsistent releases missing components in Production unmanaged customization pollution deployment failures due to dependencies rollback complexity lack of traceability That is why modern organizations implement Azure DevOps automation for Dynamics 365 CE / CRM using CI/CD pipelines. This blog explains how to architect a complete automation strategy using Azure DevOps for D365 CRM projects. Why Azure DevOps for D365 CRM? Azure DevOps provides: version control (Git repos) build & release pipelines approvals and governance artifact management deployment automation integration with Power Platform tools 📌 Architect Callout If you don’t have CI/CD, you don’t have enterprise ALM. 1. Target ALM Architecture (Enterprise Standard) Recommended Environment Setup A proper CRM ALM environment chain: ...

Architecting Beyond the Box: D365 CE, Power Platform & Azure in the Real World

  Architecting Beyond the Box: D365 CE, Power Platform & Azure in the Real World In most enterprise programs, Dynamics 365 CE and the Power Platform are not the system—they are part of a much larger digital ecosystem. CRM is expected to orchestrate processes, surface insights, integrate with core platforms, and scale with the business. This is where architecture matters more than features. As architects, our job is not to “make it work,” but to make it sustainable . The Common Trap: Overloading the Platform A frequent anti-pattern I see is treating Dataverse and Power Apps as a full replacement for enterprise integration or processing layers: Heavy synchronous plugins for complex business logic Power Automate flows performing batch processing CRM used as a reporting engine Direct point-to-point integrations between systems It works—until it doesn’t. You start seeing: Timeouts in plugins and flows API throttling ...

Data Loss Prevention (DLP) policies in Dynamics 365 CRM / CE / Power Platform

Data Loss Prevention (DLP) policies in Dynamics 365 CRM / CE / Power Platform are one of the most powerful governance tools Microsoft provides. And ironically, they are also one of the most ignored. Most organizations start their Power Platform journey with excitement: build apps quickly automate approvals connect to systems enable citizen developers scale adoption Then, after a few months, someone discovers: flows sending data to personal emails connectors using consumer services SharePoint + Outlook + external connectors mixed together sensitive customer data going into unmanaged apps integrations built without IT visibility And suddenly the organization realizes: D365 CRM / CE / Power Platform is not just productivity. It is also data movement. That’s when DLP enters the conversation—usually too late. What DLP Really Controls Many people think DLP is just: “Block some connectors.” But in reality, DLP defines the mos...