POWEROBJECTS

718 Washington Ave. N. Suite #101
Minneapolis, MN 55401
View map and all Locations

Send us a message

When customizing lookups in Dynamics CRM, you may run into a scenario where you are unable to assign Accounts to Users, but can assign Account records to Teams. Here is what the lookup will look like when trying to assign Account records.

customizing

Customizing Lookups in Dynamics CRM

Everything looks normal except for the grayed out Look for dropdown.

Initially, it may appear that the assign button was rebuilt or that there is some JavaScript firing upon clicking the button. However, the issue is actually with the XML for the Account entity.

A quick export of the Account entity in a solution will allow you to review the XML and find the <LookupType> tag. This part of the XML defines what entities are allowed to be used for lookup when assigning the entities. Here’s what the XML looked like originally:

<LookupTypes>

  <LookupType id=”00000000-0000-0000-0000-000000000000″>9</LookupType>

              </LookupTypes>

              <displaynames>

                <displayname description=”Owner” languagecode=”1033″ />

              </displaynames>

Leveraging the SDK we know that the ObjectTypeCode of 9 is Teams, and for Users it is 8.

The fix here was to add the tag:

<LookupType id=”00000000-0000-0000-0000-000000000000″>8</LookupType>

The completed XML should look like this:

<LookupTypes>

                <LookupType id=”00000000-0000-0000-0000-000000000000″>8</LookupType>

  <LookupType id=”00000000-0000-0000-0000-000000000000″>9</LookupType>

              </LookupTypes>

              <displaynames>

                <displayname description=”Owner” languagecode=”1033″ />

              </displaynames>

Follow these steps and you should no longer have an issue with customizing lookups in Dynamics CRM. Here is a complete list of ObjectTypeCodes. You can also check out how to Create a Custom Filtered Lookup in CRM 2011.

For more helpful tips and tricks for Dynamics CRM, keep checking our blog!

Happy CRM’ing!

Avatar for JoeCRM

JoeCRM

Joe CRM is a CRM superhero who runs on pure Microsoft Dynamics CRM adrenaline. As the face of PowerObjects, Joe CRM’s mission is to reveal innovative ways to use Dynamics CRM and bring the application to more businesses and organizations around the world.