You need to sign in to do that
Don't have an account?
checkbox disable according to user field
I have a Vf page where I have pageblocktable of Account with checkbox.
In account I have 'doctype' field whose values could be 'hyp' or 'wel' or 'hyp and wel'
I have a 'reptype' field in User object suppose 'hyp'
In pageblocktable I need checkbox to be disabled according to rep type.
For ex,
1----If user reptype is 'hyp only', then disable accounts with value 'hype + wel' and 'hyp heavy'
2----If user reptype is 'wel', then disable accounts with value 'wel heavy' and 'well + hype'
You can do something like this
Example 1.
You can add other condition by doing an OR in the disabled attribute
Thanks for the reply.
If I do that way, What about user of other reptype like'wel'.
I want to disable the checkboxes dynamically.
Or you can use a wrapper class to disable the checkboxxes
In other words, I want to disable records which match field value.
This code gives you a Idea about how to disable checkbox based on condiftions
Can you elaborate the way to do it in both ways.?
Have you found out how to do this. I have similar requirement lik this with lead record.
I created field in object with the valuee that I use and used disabled attribute to disable checkbox.
Arun,
I have similar scenario as yours. But the issue is i have a multi-select picklist field when i append it in disabled i get error as multiselect picklist cannnot be used in this tag.
Could you pleae suggest a way hoe to achieve.
<apex:inputCheckbox value="{!leadVar.isSelected}" onclick="childCheck(this.checked)" disabled="{!IF($User.GCAM_Region__c == leadVar.RI_Zone__c,false,True)}"/>
GCAM_Region__c is a multiselect picklist in User Object.