How to send communication event to Openframe API from UI Macro.

prakashr1
Kilo Contributor

I have an openframe API subscribed to CommicationEvent from Topframe. How to fire event from UI Macro to openframe.

1 ACCEPTED SOLUTION

Kiran Ramanna
ServiceNow Employee
ServiceNow Employee

You need to use openframe_request to communicate with openframe from UI Macro .

var context = {"payload": payload, "method" : "openframe_communication" };
CustomEvent.fireAll("openframe_request", context);

View solution in original post

3 REPLIES 3

Kiran Ramanna
ServiceNow Employee
ServiceNow Employee

You need to use openframe_request to communicate with openframe from UI Macro .

var context = {"payload": payload, "method" : "openframe_communication" };
CustomEvent.fireAll("openframe_request", context);

I'm using a Client Scripts to calll CustomEvent.fireAll and getting error "(g_env) [SCRIPT:EXEC] Error while running Client Script "IPFX  Open Frame": TypeError: CustomEvent.fireAll is not a function"

 

function onLoad() {
	var a = g_user.userID;
   alert(a);
//Type appropriate comment here, and begin script below
   var context = { "payload": a, "method": "openframe_communication" };
   CustomEvent.fireAll("openframe_request", context);
}

Will this applicable to send communication event to Openframe API from Agent Workspace(i.e. Top Frame)?

Please response...