• ZeeShan AbbAs
  • NEWBIE
  • 0 Points
  • Member since 2012

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 1
    Replies

Hey,

I made a pickList in User object and want to add data dynamically but I cannot do it via controller because it is a Standard Page and I dont have access to controller as per my knowledge..
Is there is any way to add options dynamically through another controller like we can get options through Schema

 

public List<SelectOption> getName()
    {
    List<SelectOption> options = new List<SelectOption>();
    Schema.DescribeFieldResult fieldResult = User.Organization__c.getDescribe();
    List<Schema.PicklistEntry> ple = fieldResult.getPicklistValues();
    for( Schema.PicklistEntry f : ple)
    {
    	options.add(new SelectOption(f.getLabel(), f.getValue()));
    }       
    return options;
}

 

 Is there is any way to put values to that schema...??
thanks 



Hey,

I made a pickList in User object and want to add data dynamically but I cannot do it via controller because it is a Standard Page and I dont have access to controller as per my knowledge..
Is there is any way to add options dynamically through another controller like we can get options through Schema

 

public List<SelectOption> getName()
    {
    List<SelectOption> options = new List<SelectOption>();
    Schema.DescribeFieldResult fieldResult = User.Organization__c.getDescribe();
    List<Schema.PicklistEntry> ple = fieldResult.getPicklistValues();
    for( Schema.PicklistEntry f : ple)
    {
    	options.add(new SelectOption(f.getLabel(), f.getValue()));
    }       
    return options;
}

 

 Is there is any way to put values to that schema...??
thanks