While working on migrating data from a legacy CRM system to Microsoft Dynamics CRM 2011 using Scribe Insight, I decided to set the owner of all migrated entities to a specific team (rather than the default, which is the Dynamics user specified in the Scribe connection). To do this seemingly would require one simple steps: to look up the GUID of the team, and set the value of the Dynamics CRM “ownerid” to that value.
To set the “ownerid” I used the DBLOOKUP command to look up the team by name, and return the teamid: DBLOOKUP( “MyTeamName”, “CRM”, “team”, “name”, “teamid” ). This worked fine, but on its own, Dynamics threw an error, saying that the GUID wasn’t valid.
The problem lies in how Dynamics manages owners: an owner can be a user or a team. The owner of an entity is assumed to be a user unless you change the “owneridtype” field, which is visible in Scribe but is not listed in the Dynamics data dictionary (as far as I could tell). If the owner is a user, the “useridtype” should be 8. If the owner is a team, the “useridtype” should be 9.
After setting the “useridtype” to 9, Dynamics accepted the GUID of my team in the “ownerid” field. Problem solved!
MC says:
Thanks for this post, I’d been hunting for an answer to this.
DG says:
I’m a little confused on this. In your comments you say “change the owneridtype field”, but then you go on to say “if the owner is a team, the useridtyp should be 9”. So I’m confused which field should be set to a 9, the owneridtype field or the useridtype????
Kannan Chandrasekaran says:
the team you linked is an ‘Access Team’ or ‘Owner Team’??
I want to link an ‘entity’ to an ‘Access team’.. any tips pls..