You need to sign in to do that
Don't have an account?
shrey.tyagi88@tcs.com
button on visualforce page logic-Please help!!
Hi All,
I have this apex:button on visualforce page that I want to render ob the basis of outcome of two conditions .
render =A AND (Not (B)).
A condtion is = {!Opportunity.Checkbox==False}
B condtion is="{!$ObjectType.Opportunity.updateable}"
rendered="{(!Opportunity.Checkbox==False) && !(!$ObjectType.Opportunity.updateable)}" is not working as expected
i AM UNABLE TO GET THE RIGHT SYNTAX HERE, can anyone please help me!!!!
rendered="{!(NOT(opportunity.checkbox) && (NOT($object. Opportunity.isUpdateable))}"
and if your checkbox field is a text field containing the value as false, then you'd need to include quotes:
rendered="{!((opportunity.checkbox == 'False' ) && NOT($object.opportunity.isupdateable))}"
Also make sure the cases. FALSE will not be equal to False or false
All Answers
wouldnt this work
rendered="{!(NOT(opportunity.checkbox) && (NOT($object. Opportunity.isUpdateable))}"
and if your checkbox field is a text field containing the value as false, then you'd need to include quotes:
rendered="{!((opportunity.checkbox == 'False' ) && NOT($object.opportunity.isupdateable))}"
Also make sure the cases. FALSE will not be equal to False or false
Thanks a lot Shailesh for your reply, I used your solution and it worked. The reason I faced this issue is because i got confused over use of "!" in rendered tag as a getter and as a NOT symbol. If its not too much trouble for you , could you please explain the cause and effect of using "! " in rendered tag?