Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When you add an new field to an object in, it is possible to check the "Required" checkbox to make it mandatory for every data insert/update. I know it is possible to make it required from a layout, but these conditions are not applied when inserting or updating the database from an Apex code.

Is there a reason why there's no way to do the same with a picklist field?

share|improve this question
up vote 5 down vote accepted

I don't know if there is a reason why it is not possible, but no, it is not possible to set it required as part of the custom field.

If you absolutely must make it required, provide a default value and/or write a validation rule that verifies that a value is selected on insert and update. This should ensure that a value is always associated to that field.

Here is the validation rule you need:


where Test_Value__c is the API name of your field.

share|improve this answer
How do you plan to check something is filled in with a "workflow rule"... Is that a typo? – eyescream Jan 24 '13 at 16:11
Yep, I meant validation rule. Thanks! – Jesse Altman Jan 24 '13 at 16:14
Ok, then I'm deleting mine and giving you +1, I thought you're really answering in some harebrained workflow-y way. But ISBLANK works just fine on multiselect picklists ;) – eyescream Jan 24 '13 at 16:15
Yes, this is what I am doing right now, using a validation rule. I really don't get it, this should be a built-in feature to preserve data integrity. I'll wait to see if somebody else has another answer to justify the reason behind this. – jpmonette Jan 24 '13 at 16:45
I would assume it is related to fact that picklists have the --None-- value when no default option is selected and/or the fact that dependent picklists exit. This is just speculation as I have no idea how they store all of that data under the covers. Hopefully someone else has a good idea of why it isn't base functionality. – Jesse Altman Jan 24 '13 at 16:53

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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