Also I found an example which may be of interest to you:-
Phone Dialer
HYPERLINK("http://servername/call?id=" & Id & "&phone=" & Phone, Phone)creates a linkable phone number field that automatically dials the phone number when clicked. In this example, replace "servername" and "call"
with the name of your dialing tool and the command it uses to dial. The merge field, Id, inserts the identifier for the contact, lead, or account record. The first Phone merge field tells the dialing tool what number to call and the last Phone merge field uses the value of the Phone field as the linkable text the user clicks to dial.
Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved.
i Have tried like this but it is not calling my visual force page.
HYPERLINK("/apex/DialMerchant?id=" & Id & "&phone=" & Phone, Phone)
Also i want to pass phone parameter to controller , If i apply this logic on all the objects then how will i know from which object i am getting phone number?
You have to create that using a formula field. Use that field for calling.
You have to use the following formula for the formula field:-
HYPERLINK(url, friendly_name [, target])
url- URL of your visual force page
Friendly Name- any text you show say Call - Phone number "Call"+ phone__c
The target parameter is optional. If you do not specify a target, the link opens in a new browser window. Some common target parameters are:
HYPERLINK("00U/e?retURL=%2F006x0000001T8Om&what_id=" & Id, "Create Event")
Also I found an example which may be of interest to you:-
Phone Dialer
HYPERLINK("http://servername/call?id=" & Id & "&phone=" & Phone, Phone)creates a linkable phone number field that automatically dials the phone number when clicked. In this example, replace "servername" and "call"
with the name of your dialing tool and the command it uses to dial. The merge field, Id, inserts the identifier for the contact, lead, or account record. The first Phone merge field tells the dialing tool what number to call and the last Phone merge field uses the value of the Phone field as the linkable text the user clicks to dial.
Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved.
Could you please tell me the syntax to call my visual force page (say testdial.page) after clicking the number?
i Have tried like this but it is not calling my visual force page.
HYPERLINK("/apex/DialMerchant?id=" & Id & "&phone=" & Phone, Phone)
Also i want to pass phone parameter to controller , If i apply this logic on all the objects then how will i know from which object i am getting phone number?
try this formula
HYPERLINK('/apex/DialMerchant?id=' & Id &'&phone='&Phone,Phone)
this will result following url https://c.ap1.visual.force.com/apex/DialMerchant?id=00Q90000002eabQ&phone=4545454
and You can see 4545454 on record with hyperlink
hope this will help you out
Thanks,
Bala