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?

  • why not using dependent picklist ?Why custom settings ? Jul 30, 2013 at 13:21
  • Custom setting is used to save the weighted score. For eg. for statuses "Positive" and "Negative", the respective score will be 5 and 0. If a picklist value is added or updated, the admin can add or change the corresponding score in the custom setting.
    – ntnng
    Jul 30, 2013 at 13:47

1 Answer 1


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

  • Thanks. The custom settings seems to be the better solution.
    – ntnng
    Jul 31, 2013 at 10:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.