Don't have an account?
Search for an answer or ask a question of the zone or Customer Support.
You need to sign in to do that
Sign in to start searching questions
Signup for a Developer Edition
Sign in to start a discussion
Is there a way I can add my pick list values from an apex code. Samething for controlling pick list fields?
Thank you.
public List<SelectOption> getListType() { List<SelectOption> options = new List<SelectOption>(); options.add(new SelectOption('','--None--')); Schema.DescribeFieldResult fieldResult = account.Type.getDescribe(); List<Schema.PicklistEntry> ple = fieldResult.getPicklistValues(); for( Schema.PicklistEntry f : ple) { options.add(new SelectOption(f.getLabel(), f.getValue())); } return options; }
public List<SelectOption> getListType() { List<SelectOption> options = new List<SelectOption>(); options.add(new SelectOption('','--None--')); Schema.DescribeFieldResult fieldResult = account.Type.getDescribe(); List<Schema.PicklistEntry> ple = fieldResult.getPicklistValues(); for( Schema.PicklistEntry f : ple) { options.add(new SelectOption(f.getLabel(), f.getValue())); } return options; }