MS CRM : Direct status/status reasons updates work in Plugins, not in Workflows or Power Automate

What is Issue?

As developers working with MS Dynamics CRM, we often encounter tricky issues. Recently, I faced a situation where I needed to update the quote status from Draft to Closed and then revise it. To achieve this, I created a CRM Action that directly updated the quote status to Closed. When this action was invoked from a plugin (triggered by an automated process), it worked as expected.

However, another requirement was to create an on‑demand workflow that performed the same process as the automated plugin. While the workflow logic followed the plugin’s behavior, the issue arose when executing the action. Running the on‑demand workflow displayed the error: “Quote status cannot be changed to Closed. Please use the CloseQuoteRequest instead.”. In other words, the status update succeeded when called from a plugin but failed when executed through an on‑demand workflow.

The Reason-

In CRM, on‑demand workflows, plugins, and Power Automate each have their own execution behavior. Additionally, certain actions and status changes—such as Revise Quote, Close Quote, or Win/Lose Opportunity—are governed by CRM‑defined business rules that must be strictly followed.

Solution-

To resolve such issues, it is important to understand the different behaviors of plugins, workflows, and Power Automate flows in CRM.

When an action is executed from a plugin, it runs within the CRM pipeline and in the same transaction, where the update is treated as an UpdateRequest. Plugins can sometimes bypass certain UI validations and allow direct updates. Although plugins run in the calling user’s context, the organization service controls the transaction and leverages SDK messages internally. This makes it possible to perform update operations in special cases.

In contrast, when updates are performed through a workflow or Power Automate flow, they run in the workflow engine, which operates outside the transaction and enforces stricter validations. Additionally, when a workflow or flow is triggered on‑demand by a user, CRM applies UI validations and executes in the actual user context. These validations ensure that actions follow the defined business process sequence.

For example, when revising a quote, CRM closes the current quote and creates a new draft version for editing. It automatically increments the revision ID and maintains audit history.

Even though plugins may allow direct status or status reason updates, it is always recommended to use the appropriate CRM message (such as CloseQuoteRequest) within plugins as well. This ensures consistency and adherence to the same business process across workflows, plugins, and Power Automate flows.

Below are some of the special messages that should be used to avoid issues like this.

Module‑wise Entity List with Special Messages

📞 Service Module

EntityMessage/RequestPurpose
Case (Incident)CloseIncidentRequestCloses a case with resolution details

💼 Sales Module

EntityMessage/RequestPurpose
OpportunityWinOpportunityRequestMarks opportunity as won (requires revenue, date)
OpportunityLoseOpportunityRequestMarks opportunity as lost (requires reason, date)
QuoteCloseQuoteRequestCloses a quote (won/lost)
QuoteReviseQuoteRequestCreates a new version of a quote for editing
Sales OrderCancelSalesOrderRequestCancels a sales order
Sales OrderFulfillSalesOrderRequestMarks a sales order as fulfilled
InvoiceCancelInvoiceRequestCancels an invoice
InvoiceSettleInvoiceRequestMarks an invoice as paid/settled
ContractCancelContractRequestCancels a contract
ContractRenewContractRequestRenews a contract
ContractCloneContractRequestCreates a copy of a contract

⚙️ Common / Cross‑Module

Entity TypeMessage/RequestPurpose
Standard Entities (without dedicated close/cancel messages)SetStateRequestChanges state/status for entities that don’t have a dedicated message
Custom EntitiesUpdateRequestModern alternative for changing state/status safely
Custom EntitiesSetStateRequestUsed for custom entities when no special message exists

This is another key factor to consider when choosing a plugin over a workflow. Check out the rest of this blog for more differences between plugins and workflows.

Hope this will help…
Enjoy MS CRM!!!

Follow on Facebook- FB: MSCRM16Tech