I recently had the need to add hierarchical state and country picklists to a custom entity.  I had configured these fields in another entity and moved them to my new entity following the process in my previous post.  I should point out that global picklists are potentially going to be included in CRM v5.  Global picklists will give users the ability to create a picklist once and use it in multiple entities.  As always things can always change and features can be added and dropped until the release date.  CRM v5 is still a ways out so I decided to write this post to share the State and Country picklist functionality with you.  I have uploaded the XML for these attributes (which contains the picklist values) as well as the entity OnLoad and Country/Region OnChange events to my Windows Live SkyDrive.

The following screenshots show the resultant:

United States picklist
image

Canada picklist
image

Note that while this is a viable solution it replaces the out of the box State and Country edit fields.  That is really not an issue except when you click Track in CRM from Outlook.  The Outlook contact maps the state and country fields to the edit fields and there is no way to modify the mapping.  A potential work around is to create a workflow to update the original edit fields when the picklist attributes change.

- Eric Boocock