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.
Asked
Active
Viewed 2,605 times
2 Answers
1
Yes it is possible. You have to make a page using VisualForce.
First and foremost take a look of the official doc to how to make it.
I suppose your link should trigger a call, If so it should be something like this: <a href="tel:{!contact.phone}"> {!contact.phone}</a>
The page should be like this:
<apex:page standardController="Contact">
<apex:pageBlock title="Simple Title">
<b>Call <i>{!$User.FirstName}</i>. <a href="tel:{!contact.phone}"> {!contact.phone}</a></b>
</apex:pageBlock>
<apex:detail subject="{!Contact.Id}" relatedList="false" />
</apex:page>

Martin Borthiry
- 5,256
- 10
- 42
- 59
-
I need to create a new VisualForce page and overriding the Standard view page with new VisualForce page do you mean that ? – Vivek P Jun 18 '13 at 11:26
-
Yes indeed. But its depends how you need to display that phone link – Martin Borthiry Jun 18 '13 at 11:30
-
There is any possibility to customize the Standard view page other than overriding it with the new VF page. – Vivek P Jun 18 '13 at 11:48
-
Yes, you can change the contact page layout, adding or removing buttons or fields. But, you are not able there to include a link using a field value. So, it's depends your your requirement – Martin Borthiry Jun 18 '13 at 12:08
-
I have one more questions martin what is 'tel' which you have written in the Achor tag. – Vivek P Jun 18 '13 at 15:06
-
this is a good answer to your question http://stackoverflow.com/questions/1164004/how-to-mark-up-phone-numbers – Martin Borthiry Jun 18 '13 at 15:08
-
Hi martin, how can I append Achor tag to a phone number while rendering the contact details? – Vivek P Jun 20 '13 at 12:42
0
You can also create a hyperlink to the phone number via a formula (text) field. We did this to allow a "click to dial" functionality from Chrome to Lync as there is not a plugin for this.
Clicking the formula link will dial out the phone number in whichever application is registered for making phone calls on the computer.
HYPERLINK("tel:" & Phone, Phone, "_self")