Override 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.

Posted

in

by

Tags:


Related Posts

Comments

8 responses to “Override standard Links with VisualForce pages in Salesforce”

  1. Srinivas Avatar
    Srinivas

    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. Jitendra Zaa Avatar

    Hey Sriram, The custom field is created by me for my demo purpose.
    Please use any other “inputField” which is present in your environment.

    Regards,
    Jitendra Zaa

  3. vivek Avatar
    vivek

    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. JitendraZaa Avatar
      JitendraZaa

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

      1. vivek Avatar
        vivek

        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. JitendraZaa Avatar
          JitendraZaa

          You cant use apex:detail tag here. You have to include everything individualy…

          1. vivek Avatar
            vivek

            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?

  4. Nikhil Avatar
    Nikhil

    hii
    The new UI should replace the standard Trip create
    and edit pages.
    Adventure Planners will create Trips by clicking the New button from the standard Trip tab, the New
    button from the Trip related list on Contact records, or by using the Quick Create menu in the side
    how to solve these problem

Leave a Reply to JitendraZaaCancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Discover more from Jitendra Zaa

Subscribe now to keep reading and get access to the full archive.

Continue Reading