Quantcast
Channel: Microsoft Dynamics CRM Forum - Recent Threads
Viewing all articles
Browse latest Browse all 79901

EntityState must be set to null, Created (for Create message) or Changed (for Update message).

$
0
0

I have a Entity object. I try to update and save it using IOrganizationService.

It gives error:

EntityState must be set to null, Created (for Create message) or Changed (for Update message).


This object was returned from another function (not using same context/ IOrganizationService).

I try to set EntityState= Changed but it give other error:

The entity is read-only and the 'EntityState' property cannot be modified. Use the context to update the entity instead.


How to fix this ? it is console app, how to get context ?


Viewing all articles
Browse latest Browse all 79901

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>