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
Srinu@dreamsSrinu@dreams 

How to retrieve the values of a picklist into visualfoce picklist incase of custom controller?

bob_buzzardbob_buzzard

You can do this using the describe functionality.  Here's an example for the opportunity stage picklist:

 

Schema.DescribeFieldResult fieldResult = Opportunity.StageName.getDescribe();
List<Schema.PicklistEntry>  ple = fieldResult.getPicklistValues();
List<SelectOption> opts=new List<SelectOption>();
		
for( Schema.PicklistEntry p: ple )
{
   SelectOption option=new SelectOption(ple.getValue(), 
                                        ple.getLabel());
   opts.add(option); 
}