
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 ?
*This post is locked for comments
I have the same question (0)Please refer to the link
stackoverflow.com/.../entitystate-must-be-set-to-null-created-for-create-message-or-changed-for-u