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!

  • 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). – Antonio Grassi Nov 21 '16 at 16:47
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.

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.