Monday, March 19, 2012

Unable to reassign some CRM records after upgrade to 2011

I started having a weird issue where records for some CRM entities could not be reassigned to other users (behavior in CRM 4.0), I was able to only reassign the records to users (shown in the screen shot below – notice “Look for” is defaulted to “Team” and its value cannot be changed.)


What was odd was that this behavior was not consistent across all entities. It was occurring on the Account, Contact, Opportunity entities. But it was not happening on Lead and some other entities.

When I exported the Lead entity and compared it with the Account entity (compared the customizations.xml file), one thing that jumped out at me was that there was an additional LookupType that was set for the Lead entity:

image image
Lead customization.xml file Account customization.xml

So I copied the LookupTypes from the lead file to the account customization file and voila! it worked.

Some other things that you need to do to complete the fix:

1. as shown above add the LookupType 8 to the LookUpTypes collection under “EntityInfo\Entity\Attributes\Attribute” node.
As I was working with the Account entity, in your XML look for EntityInfo with Name = “Account” and the nested Attribute with PhysicalName = “ownerid”.

                <LookupType id="00000000-0000-0000-0000-000000000000">8</LookupType>
                <LookupType id="00000000-0000-0000-0000-000000000000">9</LookupType>

2. Next under “EntityRelationships” for an “EntityRelationship” node that references AttributeName “OwnerId” (this will be “owner_accounts” for the owner entity). You need to update the “Lookuptypes” attribute to support both 8 and 9 values, as shown below:

<field name="ownerid" requiredlevel="systemrequired" imemode="auto" lookupstyle="single" lookupbrowse="0" lookuptypes="8, 9">


Import the customization file and you should now be able to select Team or Users.


If you want to restrict the lookup to only users (and not users and teams), just replace the value of “9” to a value of “8” at both the “Attribute” level and the "EntityRelationship” level.

No comments: