3

We are experiencing this error where I cannot get click to dial functionality from a visualforce page that I have developed.

In order to troubleshoot this issue I created a simple test visualforce page and was able to determine that the click to dial functionality does in fact work when viewing the page itself, but not when the page is embedded within another record's page layout.

Here is the code for the test page:

<apex:page > 
<p>
<a href="javascript:sendCTIMessage('/CLICK_TO_DIAL?DN=6126713131&ID={\'003U000000jssOu\'}&ENTITY_NAME=Contact&OBJECT_NAME=MyContact');">Click This Number To Dial: {!HTMLENCODE("6126713131")}</a>
</p>
</apex:page>

I have also tried including the following scripts:

<apex:includeScript value="/support/console/28.0/integration.js"/>
<apex:includeScript value="/support/api/28.0/interaction.js"/>

but neither (or both) of their inclusion allows click to dial functionality from when the VF page is embedded in another page's layout.

I believe this may be a similar situation as outlined in a comment on this question:

How to USE sendCTIMessage in a visualforce page

Any/All help would be appreciated

5
  • Your issue here is the same as the question which you linked. Does the accepted answer, when used in your VF page not work embedded in the standard layout?
    – Mark Pond
    May 12, 2015 at 18:29
  • i have already tried that as well...
    – mitchspano
    May 14, 2015 at 13:14
  • 1
    Your VF page in the question doesn't resemble what's shown in the linked question at all. At this point, any suggestions are going to be total guesses unless you can post more detail so that your issue can be reproduced by someone interested in helping.
    – Mark Pond
    May 14, 2015 at 16:45
  • The information in the solution instructs the developer to import the interaction javascript library, which I clearly mention that I did. Besides that, there really are no differences in the page at all....
    – mitchspano
    May 14, 2015 at 19:02
  • have you tried adding the showheader=true attribute on your apex:page TAG?
    – mkorman
    May 6, 2016 at 13:35

3 Answers 3

1

I think you have to wrap phone number field in <support:clickToDial> tag. Please refer below link, https://www.salesforce.com/docs/developer/pages/Content/pages_compref_support_clickToDial.htm

1
  • I have already tried that as well.
    – mitchspano
    May 12, 2015 at 17:32
1

Making two changes to this example worked for me:

Firstly, I used more recent versions of the two javascript includes

<apex:includeScript value="/support/console/38.0/integration.js"/>
<apex:includeScript value="/support/api/38.0/interaction.js"/>

Second, I changed

<a href="javascript:sendCTIMessage...

to

<a href="javascript:sforce.console.cti.sendCTIMessage...

and that did the trick.

Updated snippet of code below:

<apex:page > 
<p>
<a href="javascript:sforce.console.cti.sendCTIMessage('/CLICK_TO_DIAL?DN=6126713131&ID={\'003U000000jssOu\'}&ENTITY_NAME=Contact&OBJECT_NAME=MyContact');">Click This Number To Dial: {!HTMLENCODE("6126713131")}</a>
</p>
</apex:page>

p.s: nearly 2 year old question, still updating the answer as I couldn't find it when I was searching for a solution for the same problem

0

The best solution for this problem is to use the html custom protocol extension for phone calls.

<a href="tel:0080072533333">00800 7253 3333</a>

To avoid errors on non mobile devices and computers without voip-software you should include a small javascript that checks if the custom protocol extension is supported by the current device by using this javascript library

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.