function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
soorya rsoorya r 

CTI - enableclicktodial not working with lightning page

Hi all,
I am using CTI functionality in lightning. For this i am using enableClickToDial. enableClickToDial is not working suddenly.It shows greyed out in phone column. When click a button i called the enableclicktoDial method but it is not send any callback response from CTI  to salesforce. I am not getting any console log and error also. So please help me its urgent!

Here is my code.
<apex:includeScript value="/support/api/45.0/lightning/opencti_min.js"/>

function enableclicktoDial() {
	sforce.opencti.enableClickToDial({callback: callback});
}
                   
var callback = function(response) {
    if (response.success) {
        console.log('API method call executed successfully! returnValue:', response.returnValue);
	} 
    else {
	    console.error('Something went wrong! Errors:', response.errors);
	}
};
Thanks in advance!
 
Khan AnasKhan Anas (Salesforce Developers) 
Hi Soorya,

Greetings to you!

enableClickToDial method is available in API version 38.0 or later. Please refer to the below links which might help you further with the above requirement.

https://salesforce.stackexchange.com/questions/208466/opencti-enableclicktodial-does-not-invoke-any-callback-in-salesforce-classic-con

https://developer.salesforce.com/docs/atlas.en-us.218.0.api_cti.meta/api_cti/sforce_api_cti_enableclicktodial_lex.htm

I hope it helps you.

Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future. It will help to keep this community clean.

Thanks and Regards,
Khan Anas
soorya rsoorya r
Hi Khan Anas,

Thank you for your reply. I tried both. But here the issue is, it is working fine in developer org. But once i installed the package, in installed org it is not working. Both orgs have same code only. I don't know why it is not working in installed org alone. All installed org i am facing the same issue suddenly. But still in the developing org it is working perfectly.

here you can see my adapter URL. I gave as per the doc.
developer org console log

installed org console log

Help me!

Thanks
 
Jesper HasselquistJesper Hasselquist
I am having the same issues posted in this thread. Anyone have any ideas what could be wrong? Did you find a solution to this, Soorya?