You need to sign in to do that
Don't have an account?
Select Option Filter values disable on a condition
Hi Team,
private transient List<SelectOption> cacheProductFamilies = null;
global List<SelectOption> productFamilies
{
get {
if (cacheProductFamilies==null){
cacheProductFamilies = newSelectList(false);
cacheProductFamilies.add(new SelectOption('CP','CP'));
cacheProductFamilies.add(new SelectOption('Seeds','Seeds'));
cacheProductFamilies.add(new SelectOption('Lawn and Garden','Lawn and Garden', getdisabled if(Account__r.Lawn_and_Garden_Agent__c="true")));
}
return cacheProductFamilies;
}
}
global boolean readyForSearch {
get {
return selectedProductFamily!=null;
}
}
I want to enable the Lawn and Garden option value, if a filed check box is set to true.
Could you please help me on this.
Hi Naresh,
The 3rd param of the SelectOption constructor is type of Boolean, so you need to pass a boolean value:
-Hengky-
Compile Error: Variable doesn't exist..