0

I want to show 2 banners on Account detail page. I have created visulforce page for this and have added this page to page layout section. Below is the visualforce code.

<apex:outputPanel layout="block" rendered="{!if(Account.Membership_Status_Formula__c!='Rescinded'&&isnull(Account.Trustee__c)&&!isnull(Account.Committee_Membership_List__c)&&isnull(Account.SOL_Manager__c),true,false)}">            
        <apex:outputpanel layout="block" style="background-color:yellow;color:black;width:100%;height:20px;float:left;font-weight:bold;text-align:center;padding-top:2px;" >
            <apex:outputText value="Trustee Member" />
        </apex:outputpanel>       
    </apex:outputpanel>


    <apex:outputPanel layout="block" rendered="{!if(!isnull(Account.RM_Tracking__c),true,false)}">            
        <apex:outputpanel layout="block" style="background-color:orange;color:black;width:100%;height:20px;float:left;font-weight:bold;text-align:center;padding-top:4px;" >
            <apex:outputText value="Test Banner" />
        </apex:outputpanel>       
    </apex:outputpanel>

But I can't see "Test Banner" on account record detail page.

Please suggest on this.

1
  • btw, rendered="{!!isnull(Account.RM_Tracking__c}" is good for rendering instead of if condition – Santanu Boral Jun 2 '17 at 5:20
0

In the Test Banner rendering condition, instead of using if condition

rendered="{!if(!isnull(Account.RM_Tracking__c),true,false)}"> 

Use, rendered="{!NOT(isnull(Account.RM_Tracking__c))}">

Which will return same result.

Test Banner will not display if above condition is not met.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.