function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
PubNoahPubNoah 

Removing "--none--" option in picklists

Hi there.  I can't seem to remove the "--none--" option in picklists...  I am sure it is an easy tweak, any thoughts?

Best Answer chosen by Admin (Salesforce Developers) 
User@SVFUser@SVF

As long as there are multiple options in the picklist you will have the option --none-- available even if it is a required field. That is the default behavior. I think you will have to either restrict it by record type or make the field read-only.

 

Thanks,

All Answers

User@SVFUser@SVF

please provide more information on the question. If it is in visualforce, you can make changes in the select option method associated with the select list. where you will be adding the --none-- as one of the select option.

 

Thanks

PubNoahPubNoah

USer@SVF, you are coming in very handy for me today!

 

I have a basic picklist, in a case.  It is not VisualForce.  I have set the default to another value, and made the field mandatory.  I expected that would remove the "--none--" option, but it is still available for picking.  I do not want this to be an option.

User@SVFUser@SVF

As long as there are multiple options in the picklist you will have the option --none-- available even if it is a required field. That is the default behavior. I think you will have to either restrict it by record type or make the field read-only.

 

Thanks,

This was selected as the best answer
PubNoahPubNoah

OK, thank you.