Override standard Links with VisualForce pages in Salesforce

Author posted by Jitendra on Posted on under category Categories Salesforce and tagged as Tags with 7 Comments on Override standard Links with VisualForce pages in Salesforce

Demonstration of Overriding standard Links with VisualForce pages in Salesforce

overriding existing salesforce page with your own page is one of the advantages offered by salesforce.com. In this article i will demonstrate that how we can override existing Contact page with our custom contact page.

Go to Set up | Develop | Pages and create new Visual force page with below code.

<apex:page standardController="Contact" tabStyle="Lead">
<apex:pageBlock title="My Contact Details">
<p>Hello {!contact.FirstName}</p><br>
<i>Developed by : <b>Jitendra Zaa </b></i></br> <br>
<i>This is the customPage developed</i></br>
<apex:form >
<apex:inputField value="{!contact.addit__c}"/>
</apex:form>
</apex:pageBlock>
<apex:detail relatedList="false" />
</apex:page>

The above code will only display one textbox (Custom textbox field created by me).

Now go to Set Up | App Set Up | Contacts | Buttons And Links

 

Salesforce Override Buttons and Links
Salesforce Override Buttons and Links

Edit “View” Button and select your page as shown in below image.

 

Select Custom Page to override default behavior in Salesforce
Select Custom Page to override default behavior in Salesforce

When you will go to contact page, following output will be visible.

 

Overriding default button and link in Salesforce
Overriding default button and link in Salesforce

As you can see, we have changed the default User interface of the Contact Page.

For any suggestion please leave your valuable comments.

Related posts

7 thoughts on “Override standard Links with VisualForce pages in Salesforce”

  1. Hi,

    When I implemented this I am getting the below Error

    Visualforce Error
    Help for this Page

    value for inputField is not a dynamic binding!

  2. Hi Jitendra,

    I got a requirement to customize the contacts objects Standard view page, i need to create a hyperlink to phone number field. Is it possible to do this ? Any help is appreciated.

    thank you
    vivek

    1. Hi Vivek, It is possible. But you have to create a new VF page and override standard button and link of Contact.

      1. Hi Jitendra, i have created a new VF page override the standard view page with new VF page.
        below is my code in new VF page:

        i was able render all contact details using the detail component but now i what to append the Anchor tag to phone number, how can i do this ?
        thank you,
        vivek

          1. i am using but don’t what to include everything individualy, i what to Append the anchor tag while rendering details. how can i achive this?

Leave a Reply

Your email address will not be published. Required fields are marked *