[SalesForce] Conditional rendering of a VF Page

Is it possible to render a VF page based on two booleans?

Can you have something like:

<apex:page rendered="{!relatedTo.boolean1 == true}&&{!relatedTo.boolean2 == true}">

Or should I create a formula field on the object that takes the conditions I want to check for and return one true/false result?

Best Answer

Yes you can. Based on your example, here's the right code:

<apex:page rendered="{!AND(relatedTo.boolean1, relatedTo.boolean2)}">