November 16, 2006

Picklist hell

Here are three main problems with picklists developers should be aware of:
  • Deleting values from a picklist
  • Mapping picklists
  • Picklists as duration or time fields
1. Deleting values from a picklist
When you are deleting values from a picklist be aware that the value will be deleted also from all records that contain the deleted value. You will loose data. Fortunately CRM 3.0 warns you before you attempt to do this.

2. Mapping picklists
Value type of a picklist is integer. Every time you add a value to the picklist, CRM automatically assigns integer values. You cannot edit these values since they are read-only. So if you have two mapped picklists be sure to enter both picklists in the same order. If you made a mistake, delete the values from both picklists and add them again in the same order.

Wouldn't it be nice to have some sort of "global" picklists that can be used in different entities and edited on one place?

3. Picklists as duration or time fields
You can not add values to duration or date time fields. Users can click in the field and enter the value themselves. The database stores the duration in whole minutes, so 14,25 minutes will be stored as 14 minutes.

You can tweak the lists in onLoad script to add or delete values.

No comments: