[SalesForce] Is it possible to map picklist values to some other text or number field just like standard Opportunity Stage field

In Contact object, I want to add a picklist field "Status". The values in field should have a corresponding numerical values which will be used for computation.
The structure is almost similar to the Opportunity Stage field which has the mapping between Stage Name and probability.

I have created a picklist field "Status" in Contact and a custom setting which has two fields to save the value and the corresponding numerical value. In this current system, when a new picklist value has to be added, a new record has to be created in the custom setting. Is there any better way to handle this?

Best Answer

Binding picklist values to other behavior has a bunch of less-than-optimal-for-maintenance solutions:

  1. Custom settings as you mentioned
  2. Apex static constants plus triggers and/or VF controllers
  3. Custom objects (akin to custom settings solution)
  4. Encoding the value in the picklist item itself as in "Positive [5]", "Negative [0]" and using string functions/formulas to grab the scores
  5. Using workflow field update formulas to update the Contact.score based on values in the picklist

Item #4 works OK except when the score changes for a given value - in this case, you have to decide what to do about legacy data.

If you use Item#1,2,3 you can use validations to inform the user/sysad that some aspect of the maintenance was omitted