We are trying to change the owner of an entity record using UpdateRequest message with the corresponding entity record. This happens only while changing any entity record owner from a team to a user.
For e.g. If there is an existing entity record Record1 with OwnerId as Team1 then we are trying to perform the following:
- Create an entity instance with existing entity Id (Record1) and new OwnerId (an entity reference instance with Id as user1 and LogicalName as ""(this is as per our current code logic)) attributes.
- Call Execute method with UpdateRequest message with the above entity instance.
- The operation was successful and OwnerId was also updated to user1 in CRM.
But if we try to change the owner again from user1 to user2 then we are getting the below error from CRM.
"team With Id = user1 Does Not Exist"
This happens only when we try to change the owner to the user (User1) using the same user's (User1) credentials but if we try to change the owner using the other user's (User2) credentials then it's working. But this is not issue with change the owner to User2 using User2 credentials.
Also everything works fine if we create an entity reference instance with Id as user1 and LogicalName as "systemuser" instead of "" for OwnerId attribute.
Could anyone please help me out finding the below.
- Why CRM is looking up in the Team entity records with User1 which is an user id on the following Change Owner operation even after the previous Change Owner was successful?
- Why is it happening with User1 though he is having System Administrator role but User2 is not having the same role?
*This post is locked for comments
I have the same question (0)