+ Start a Discussion

Default value for a picklist in Apex class

Is there a way to set a default value for a picklist in an Apex class? I'm using a custom controller for a VF page which appears to override the default value set.

I found the answer. I defaulted my picklist in the constructor of my controller class.


 <objectname>.<fieldname> = '<defaultvalue>';