krsasi
Tera Contributor

Additional details related the same question : 
=========================================================

Environment: ServiceNow Yokohama (Agent Workspace / OpenFrame)


Hi all — I embedded a custom CTI phone app inside OpenFrame (iframe) and I’m sending postMessage events from the CTI app to the parent ServiceNow page to show/hide the OpenFrame. Message exchange is received by my UI Script, but the OpenFrame doesn’t open/close as expected.

What I observe

The CTI app postMessage calls are logged in the parent (I see the payload in console.log), and my UI Script’s event handler runs.

However, calling window.top.NOW.CustomEvent.fireAll("openframe_shown") (or openframe_hidden) does not result in the OpenFrame showing/hiding in Agent Workspace.

What I’ve tried

Waiting for window.top.NOW.CustomEvent to be available before firing (I retry once if not ready).

Using both openframe_open / openframe_expand and openframe_shown event names.

Using window.top.NOW.workspaceNavigator.openRecord() to open an incident tab.

 

Thanks!