+ Start a Discussion
kalyforminkalyformin 

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.
kalyforminkalyformin

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

 

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