Answered by:
Reassign Ownership (ownerId) of Entity using sevicecontext - CRM 2011

Question
-
how do i reassign ownership of an entity using servicecontext? this is what i'm trying to do:
I'm using ServiceContext with early bound.
1. newing up a new entity, set Id and another text field.
2. Setting the OwnerId to another systemuser
3. calling context.Attach(), context.UpdateObject() and context.SaveChanges()result:
I see that the text was changed, but the ownership remained the same.
Any ideas?
Monday, August 26, 2013 10:28 PM
Answers
-
- Edited by Mamatha Swamy Monday, August 26, 2013 11:49 PM
- Marked as answer by marvswork Tuesday, August 27, 2013 2:39 PM
Monday, August 26, 2013 11:47 PM
All replies
-
- Edited by Mamatha Swamy Monday, August 26, 2013 11:49 PM
- Marked as answer by marvswork Tuesday, August 27, 2013 2:39 PM
Monday, August 26, 2013 11:47 PM -
Could you please share code to get more information ?
Hope this helps. If you get answer of your question, please mark the response as an answer and vote as helpful !
Vikram !Tuesday, August 27, 2013 3:46 AM -
You need to use the Assign message to change the owner of a record.
HTH
Sam
Dynamics CRM MVP | Inogic | http://inogic.blogspot.com| news at inogic dot com
If this post answers your question, please click "Mark As Answer" on the post and "Mark as Helpful"
- Proposed as answer by Paul Nieuwelaar Tuesday, August 27, 2013 7:41 AM
Tuesday, August 27, 2013 7:18 AM -
i was hoping to have that reassigned all in one call, but looks like that's not supported. thxTuesday, August 27, 2013 2:40 PM