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 ?