• Alon Waisman
  • NEWBIE
  • 10 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 2
    Replies
Hi, 
can i get all the values of a picklist field in a list some how?

I have picklist type custom field in the product. having some options.
In my apex class i want to use these options. can I get them some how throught code? 
Hai guys,
my requirment is calculate the size of set
vf page
------------------
<apex:page controller="SetExample_Controller">
  <apex:pageblock >
  <apex:pageBlockTable value="{!names}" var="v">
  <apex:column value="{!v}"/>
  </apex:pageBlockTable>
  </apex:pageblock>
</apex:page>

controller
---------------------
public class SetExample_Controller 
{
  public set<string> names{get;set;}
  public SetExample_Controller()
  {
     names = new set<string>();
     names.add('one');
     names.add('two');
     names.add('sam');
     names.add('one');
     names.add('one');
     
  }
  public Integer size()
  {
     Integer mysize = names.size();
  
     return mysize;
  } 
}

plesae help me