3

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!

1
  • Basically, if we invoke this snippet from the browser console (in the context of the softphone iframe), the callback is never executed, and there is no AJAX call to the server (from the softphone iframe or parent iframes). sforce.opencti.runApex({ apexClass:'MyNamespace.MyApiClass', methodName:'myMethod', methodParams:{}, callback:function(result) {console.log(result); } }); As if the invocation silently failed/returned. But it succeeds in a non-packaged environment (without the namespace prefix of course). Commented Nov 21, 2016 at 16:47

1 Answer 1

0

We finally figured this out. 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

This fixed for us the issue described above.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .