+ Start a Discussion

OpenCTI runApex() fails in Lightning and Package

Our application uses the OpenCTI runApex() method to communicate with the backend. It works well in Lightning on our DE orgs.

But then we uploaded a package and installed it in another org. There we created an application with the CTI toolbar enabled. This org has My Domain enabled, and we used the absolute URL in the Call Center definition. All right?

The application loads, but fails when communicating with the backend with the OpenCTI runApex() method.

After some research, we found out that no requests are sent at all over the network. So it's not that the server fails to respond or there's some protocol/communication issue. But basically, the network request isn't dispatched at all.

Any feedback here? Are we aware of any issue with the runApex() method when in Lightning and in a packaged context? Again, this works OK in Lightning when testing in our dev environments (i.e., in a non-packaged context).

Thanks very much!
NagendraNagendra (Salesforce Developers) 
Hi Agrassi,

Please find below post which was addressed in the stack exchange community.

Instead of using
https://< myDomain >.lightning.force.com/apex/adapterPage
as the CTI adapter URL, it should be
https://< myDomain >.< yourInstance >.visual.force.com/apex/adapterPage

Mark this as solved so that it gets removed from the unanswered queue and others can also benefit from it.