function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Alan Monk 10Alan Monk 10 

'Do not Contact' Banner

I want to create a simple VF page 'Do not Contact' banner that applies to 1 Contact Record Type. The banner will be displayed on the 'contacts' page layout. I have looked at the examples but being an Admin and not a developer I need some guidance.
Best Answer chosen by Alan Monk 10
Alain CabonAlain Cabon
Alan, Rahul Kumar has provided interesting links for a common banner.

You want to control the display according one specific recordtype.

This conditional display is done using the rendered tag.

rendered Boolean A Boolean value that specifies whether the component is rendered on the page. If not specified, this value defaults to true.
<apex:page standardController="Contact" showHeader="false" applyHtmlTag="false">
  <apex:outputPanel style="font-size: 40px;background-color:red;width:100%;padding:10px;" rendered="{!Contact.RecordType.Name = 'specific_recordtype_name'}">
      Do not Contact!
  </apex:outputPanel> 
</apex:page>

You can put this visualforce page directly in a standard layout of contact.

Regards

All Answers

Rahul KumarRahul Kumar (Salesforce Developers) 
Hi Alan Monk,

May I suggest you Please refer the below link for reference. Hope it will be helpful.

Please mark it as best answer if the information is informative.so that question is removed from an unanswered question and appear as a proper solution.

Thanks
Rahul Kumar
Alain CabonAlain Cabon
Alan, Rahul Kumar has provided interesting links for a common banner.

You want to control the display according one specific recordtype.

This conditional display is done using the rendered tag.

rendered Boolean A Boolean value that specifies whether the component is rendered on the page. If not specified, this value defaults to true.
<apex:page standardController="Contact" showHeader="false" applyHtmlTag="false">
  <apex:outputPanel style="font-size: 40px;background-color:red;width:100%;padding:10px;" rendered="{!Contact.RecordType.Name = 'specific_recordtype_name'}">
      Do not Contact!
  </apex:outputPanel> 
</apex:page>

You can put this visualforce page directly in a standard layout of contact.

Regards
This was selected as the best answer
Alan Monk 10Alan Monk 10
Thanks Alain, I have tested this in a VF page and does exactly what I want ti to do.