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 :
Customer experience | Sales, Customer Insights,...
Answered

Error "Operation is not valid due to the current state of the object" on Dynamic CRM 2016 on-premise

(1) ShareShare
ReportReport
Posted on by 105

User are facing the issue during saving data, and fail with same error code as "Microsoft.Xrm.Sdk, Version=8.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: Operation is not valid due to the current state of the object". All saving action fail and then resolved by itself without any action.

We have check with a KB https://support.microsoft.com/en-us/help/2661403/an-asp-net-request-that-has-lots-of-form-keys-files-or-json-payload-me, but my server is Window server 2012.

Do anyone have resolution for this.

------ Error Detail ---

Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=8.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: Operation is not valid due to the current state of the object.Detail:
<OrganizationServiceFault xmlns:i="">www.w3.org/.../XMLSchema-instance" xmlns="">schemas.microsoft.com/.../Contracts">
<ActivityId>f16619c8-3efc-420f-9774-fdff15d3ee1b</ActivityId>
<ErrorCode>-2147220891</ErrorCode>
<ErrorDetails xmlns:d2p1="">schemas.datacontract.org/.../System.Collections.Generic">
<KeyValuePairOfstringanyType>
<d2p1:key>OperationStatus</d2p1:key>
<d2p1:value xmlns:d4p1="">www.w3.org/.../XMLSchema" i:type="d4p1:string">0</d2p1:value>
</KeyValuePairOfstringanyType>
<KeyValuePairOfstringanyType>
<d2p1:key>SubErrorCode</d2p1:key>
<d2p1:value xmlns:d4p1="">www.w3.org/.../XMLSchema" i:type="d4p1:string">-2146233088</d2p1:value>
</KeyValuePairOfstringanyType>
</ErrorDetails>
<Message>Operation is not valid due to the current state of the object.</Message>
<Timestamp>2020-12-28T06:34:47.4794557Z</Timestamp>
<ExceptionSource i:nil="true" />
<InnerFault i:nil="true" />
<OriginalException i:nil="true" />
<TraceText>

[Microsoft.Crm.ObjectModel: Microsoft.Crm.ObjectModel.SyncWorkflowExecutionPlugin]
[4229b661-8d24-eb11-8163-005056030f64: ]
Starting sync workflow 'sample....', Id: 3829b661-8d24-eb11-8163-005056030f64
Sync workflow 'sample....' terminated with error 'Operation is not valid due to the current state of the object.'

</TraceText>
</OrganizationServiceFault>

-------------------

Thanks,

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

    What is the status/status reason of the record you are updating? This reads like its inactive.

  • Verified answer
    Prakash Kalimuthu Profile Picture
    on at

    Hi Nam,

    Check whether any background workflow or async plugin tries to update complete/cancelled or inactive record while saving.

    If you want to update something before record goes to inactive/read-only state. Do it synchronously either through plugin or workflow.

    Regards,

    Prakash

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 > Customer experience | Sales, Customer Insights, CRM

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 83 Super User 2025 Season 2

#2
Gerardo Rentería García Profile Picture

Gerardo Rentería Ga... 49 Most Valuable Professional

#3
#ManoVerse Profile Picture

#ManoVerse 40

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans