Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future. It will help to keep this community clean.
Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future. It will help to keep this community clean.
Greetings to you!
Please try the below code, I have tested in my org and it is working fine. Kindly modify the code as per your requirement.
Visualforce:
Controller:
In for loop, you can check if the entry is the one you don't want.
Please refer to the below links which might help you further with the above requirement.
https://developer.salesforce.com/forums/?id=906F0000000fxhfIAA
https://salesforce.stackexchange.com/questions/166987/display-specific-picklist-value-based-on-criteria
I hope it helps you.
Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future. It will help to keep this community clean.
Thanks and Regards,
Khan Anas
All Answers
Greetings to you!
Please try the below code, I have tested in my org and it is working fine. Kindly modify the code as per your requirement.
Visualforce:
Controller:
In for loop, you can check if the entry is the one you don't want.
Please refer to the below links which might help you further with the above requirement.
https://developer.salesforce.com/forums/?id=906F0000000fxhfIAA
https://salesforce.stackexchange.com/questions/166987/display-specific-picklist-value-based-on-criteria
I hope it helps you.
Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future. It will help to keep this community clean.
Thanks and Regards,
Khan Anas
List<SelectOption> options = new List<SelectOption>();
Schema.DescribeFieldResult fieldResult = Account.Rating.getDescribe();
List<Schema.PicklistEntry> ple = fieldResult.getPicklistValues();
for(Schema.PicklistEntry f : ple)
{
if(!f.getValue().equalsIgnoreCase('Warm') && !f.getValue().equalsIgnoreCase('Hot') )
{
options.add(new SelectOption(f.getLabel(), f.getValue()));
}
} system.debug('options'+options);
Please try this piece of code...
Thanks, sfdc x-man