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 :
Microsoft Dynamics CRM (Archived)

workflow error : The state transition requested is not valid for the current state. Current state: 2, current status: 22, target state: 3.

(0) ShareShare
ReportReport
Posted on by 2,385

Hi,

I have a workflow which updates a field on case form which is the lookup of the team. Most of the time this workflow works fine but sometime stuck in the waiting state and never get succeeded. 

I am getting the error message as : The state transition requested is not valid for the current state. Current state: 2, current status: 22, target state: 3.

Also details as :

Plugin Trace:

[Microsoft.Xrm.Sdk.Workflow: Microsoft.Xrm.Sdk.Workflow.Activities.UpdateEntity]
[UpdateStep10]

[Microsoft.Crm.Service.ObjectModel: Microsoft.Crm.Service.ObjectModel.CasePostUpdatePlugin]
[4b723f64-b443-422b-a269-34ad739f19ee: CasePostUpdatePlugin]


Error Message:

Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=7.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: The state transition requested is not valid for the current state. Current state: 2, current status: 22, target state: 3.Detail:
<OrganizationServiceFault xmlns:i="www.w3.org/.../XMLSchema-instance" xmlns="schemas.microsoft.com/.../Contracts">
<ErrorCode>-2147204763</ErrorCode>
<ErrorDetails xmlns:d2p1="schemas.datacontract.org/.../System.Collections.Generic" />
<Message>The state transition requested is not valid for the current state. Current state: 2, current status: 22, target state: 3.</Message>
<Timestamp>2015-08-11T12:44:35.2264965Z</Timestamp>
<InnerFault>
<ErrorCode>-2147204763</ErrorCode>
<ErrorDetails xmlns:d3p1="schemas.datacontract.org/.../System.Collections.Generic" />
<Message>The state transition requested is not valid for the current state. Current state: 2, current status: 22, target state: 3.</Message>
<Timestamp>2015-08-11T12:44:35.2264965Z</Timestamp>
<InnerFault i:nil="true" />
<TraceText i:nil="true" />
</InnerFault>
<TraceText>[Microsoft.Xrm.Sdk.Workflow: Microsoft.Xrm.Sdk.Workflow.Activities.UpdateEntity]
[UpdateStep10]

[Microsoft.Crm.Service.ObjectModel: Microsoft.Crm.Service.ObjectModel.CasePostUpdatePlugin]
[4b723f64-b443-422b-a269-34ad739f19ee: CasePostUpdatePlugin]
</TraceText>
</OrganizationServiceFault>
at Microsoft.Crm.Extensibility.OrganizationSdkServiceInternal.Update(Entity entity, CorrelationToken correlationToken, CallerOriginToken callerOriginToken, WebServiceType serviceType, Boolean checkAdminMode, Boolean checkForOptimisticConcurrency, Dictionary`2 optionalParameters)
at Microsoft.Crm.Extensibility.InprocessServiceProxy.UpdateCore(Entity entity)
at Microsoft.Crm.Workflow.Services.UpdateActivityService.<>c__DisplayClass1.<UpdateInternal>b__0(IOrganizationService sdkService)
at Microsoft.Crm.Workflow.Services.ActivityServiceBase.ExecuteInTransactedContext(ActivityDelegate activityDelegate)
at Microsoft.Crm.Workflow.Services.UpdateActivityService.UpdateInternal(Entity entity, String stepId)
at Microsoft.Crm.Workflow.Services.UpdateActivityService.ExecuteInternal(ActivityContext executionContext, UpdateEntity updateEntity)
at Microsoft.Crm.Workflow.Services.UpdateActivityService.Execute(ActivityContext executionContext, UpdateEntity updateEntity)
at System.Activities.CodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager)
at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)

Any help on this would be helpful for me  Capture22.PNG

e.

 

*This post is locked for comments

I have the same question (0)
  • Roxana Profile Picture
    691 on at

    Good Morning. I have the same issue. How did you solve it?

  • Suggested answer
    Community Member Profile Picture
    on at

    Hi, 
    Is this CRM online org , if yes either you can take open a support case or you can create a new trial org .

  • TonyN Profile Picture
    695 on at

    Check to make sure the Status Reason "22" didn't get removed.

  • Suggested answer
    Community Member Profile Picture
    on at

    Hi, to resolve this issue navigate to Entity --> Status Reason field and click on "Edit Status Reason Transitions" and define statuses that the record can be updated too. You probably have other workflows/plugins updating status to a value that is not defined in this transition. As a result, this step is giving you the error.

    technet.microsoft.com/.../dn660979.aspx

  • Roxana Profile Picture
    691 on at

    Hi. There are no plugins that affect the state and status reason. Even though, all plugins were deactivated.

    I applied "Transition for the status reason", the message was clearer: "The Status Reason: from 2 can not pass to 3 in incident", because the incident is cancelled.  But "The incident is NOT cancelled, and any user does that action"

    All this scenario came up from an SLA ITEM set up:

    1-At Warning Time: Update the incident Status Reason to "Warning" (Code 2).

    2-At Failure Time: Update the incident Status Reason to "Error" (Code 3).

    Conditions: When the Incident is Type: "Request" and State: "Active"

    Success Conditions: When the Incident is State: "Solved or Cancelled".

    The WorkAround that I have applied, because of time is: "Changing the action of Warning TIme"

    1-At Warning Time: Update the incident Field: "Warned??: to YES".

    2-At Failure Time: Update the incident Status Reason to "Error" (Code 3).

    In this way, the workflow that comes up from the SLA Ítem: Updates the Incidente, and no error in the workflow happens.

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!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
Varsha deshpande Profile Picture

Varsha deshpande 5

#2
JS-09031509-0 Profile Picture

JS-09031509-0 3

#3
Ciprian  P Profile Picture

Ciprian P 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans