The CreatorCon Call for Content is officially open! Get started here.

Need help to call function by passing parameter in UI Action

Priyanka Shett1
Tera Contributor

Hi Team,

 

We are trying to use the pop functionality within the Workspace Client Script section in UI action.

When we click on UI Action the pop up will be shown, but after selecting the value in pop using 

 g_modal.showFrame method, we are unable to pass the selected value and call the glide ajax function.
Could you please help if there is any method where we can pass the parameter and call the function to trigger a soap message.
 
The issue we are facing here is we are able to select the options from pop up but unable to call the function and close the dialog window.
 
Best Regards,
Priyanka Shetty
2 REPLIES 2

Ankur Bawiskar
Tera Patron
Tera Patron

@Priyanka Shett1 

so you are using showFrame to call UI page and value selected in UI page should be available again in workspace client script?

share screenshots.

💡 If my response helped, please mark it as correct ✔️ and close the thread 🔒 — this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

kaushal_snow
Mega Sage

@Priyanka Shett1 ,

 

In my experience, you can open a pop up via g_modal.showFrame() in a UI Action, and then pass back selected values using a UI Page and window.postMessage / iframeMsgHelper.confirm() to send data from the iframe to the parent, then in your callback in showFrame() catch those values and call a GlideAjax or server action before closing the dialog...

 

If you found my response helpful, please mark it as ‘Accept as Solution’ and ‘Helpful’. This helps other community members find the right answer more easily and supports the community.

 

Thanks and Regards,
Kaushal Kumar Jha - ServiceNow Consultant - Lets connect on Linkedin: https://www.linkedin.com/in/kaushalkrjha/