You need to sign in to do that
Don't have an account?
Jesper Hasselquist
enableClickToDial callback not being called
Hi fellow developers,
I have developed an openCTI app for the Lightning Experience and am now trying to implement Click To Dial. When I am testing it out in a scratch org, everything works perfectly. But when I package the app into a Managed Beta package and install it in an org, it does not work. None of my callbacks are being called. Please see below code snippet for my code I am trying to run.
I have developed an openCTI app for the Lightning Experience and am now trying to implement Click To Dial. When I am testing it out in a scratch org, everything works perfectly. But when I package the app into a Managed Beta package and install it in an org, it does not work. None of my callbacks are being called. Please see below code snippet for my code I am trying to run.
function enableClickToDialCallback(response) { if (!response.success) { console.error("Something went wrong while initializing Click to Dial. Errors:", response.errors); } } sforce.opencti.enableClickToDial({ callback: enableClickToDialCallback }); function clickToDialListener(payload) { if (payload.number) { console.log("Payload", payload); } } sforce.opencti.onClickToDial({ listener: clickToDialListener });
Can someone tell me what I am missing?
Thanks in advance!
Does this happen even with salesforce provided "Open CTI Demo Adapter" or just with the app you developed?
Thanks
Hi Swetha,
I have not tried the demo before, so I tried setting it up now. But I was not able to set things up and get the code to an org where I could test it.
But the problem is not that my click to dial is not working. The problem is that click to dial is not working after i package it into a Managed Beta package and installing that into an org. The callbacks that I pass into `enableClickToDial` and `onClickToDial` is never called. It worked perfectly in my scratch org though.
Do you see any errors in console logs?Also, this post might be of help - https://developer.salesforce.com/forums?id=906F00000009BCoIAM .
Please mark this answer as best if it helps.
Thanks
Hi!
No errors in the console. I have no idea what they are talking about in that post you linked. I am not using the `runApex` method.