You need to sign in to do that
Don't have an account?
Marek Cech
Lightning Open CTI screenPop() not working
Hi guys,
I've been trying to use Lightning Open CTI to implement a softphone for Lightning Service Console. Click2dial-related functions work like a charm but screenPop() function keeps throwing this:
This page has an error. You might just need to refresh it. Action failed: c:TestCompo$controller$handleClick [Failed to execute 'postMessage' on 'Window': [object Object] could not be cloned.] Failing descriptor: {c:TestCompo$controller$handleClick}
I've created a Visualforce page and Call Center. The page contains Lightning components. Open CTI is included in page:
Any idea how to solve this?
Thanks
I've been trying to use Lightning Open CTI to implement a softphone for Lightning Service Console. Click2dial-related functions work like a charm but screenPop() function keeps throwing this:
This page has an error. You might just need to refresh it. Action failed: c:TestCompo$controller$handleClick [Failed to execute 'postMessage' on 'Window': [object Object] could not be cloned.] Failing descriptor: {c:TestCompo$controller$handleClick}
I've created a Visualforce page and Call Center. The page contains Lightning components. Open CTI is included in page:
<apex:includeScript value="/support/api/41.0/lightning/opencti_min.js"/>Even a simple copy pasted code throws the error mentioned above:
sforce.opencti.screenPop({ type: sforce.opencti.SCREENPOP_TYPE.SOBJECT, params: { recordId: '0012F0000089wQuQAI' } });I've double checked that account with hardcoded ID exists in the system.
Any idea how to solve this?
Thanks
It works for me. Copy opentcti.js source code to static resource and modify these lines: Not perfect solution, but it seems that it is consequence of locker service enforcement which is handling JS objects through native browser Proxy{} object. If you stringify and parse back to JS object it'll remove functions and invalid objects for postmessage and it'll work.
If someone has more advanced answer, please I would like to hear some.
Can you share me the opentcti.js source code. To make those change as you said above.
Thanks......