How to render the iframe on the same page with ui action?

hyperjam
Giga Contributor

I have UI action list banner button on the table requested items [sc_req_items], so that if user want to see his onboarding requests (table [u_onboarding_request],

he will click button and the iframe [SelfServicePortal - Onboarding Requests Frame] for onboarding requests on the same page should load.The url in iframe is like this [u_onboarding_request_list.do?sysparm_query=u_buddyDYNAMIC90d1921e5f510100a9ad2572f2b477fe%5EORu_hr_repDYNAMIC90d1921e5f510100a9ad2572f2b477fe%5EORu_managerDYNAMIC90d1921e5f510100a9ad2572f2b477fe%5EORu_new_hireDYNAMIC90d1921e5f510100a9ad2572f2b477fe&sysparm_view=ess] and this iframe is working.

The problem is that clicking the button does not redirect anywhere, also i tried smth like action.setRedirectURL(' and here i gave various combinations of url'); and   each time clicking button showing the message "No records selected",

1 ACCEPTED SOLUTION

Manjul Katare
ServiceNow Employee
ServiceNow Employee

Hi Anna,



Creating a Ui action using OnClick : window.open("order_services.do","_self"); might help you.



Please refer below screenshots:



Your UI action :


find_real_file.png



Goto a page which has the UI action.


(Note: I'm using incident_list.do as an iframe source)



find_real_file.png



When you click on the "Goto Order Services" button, it opens up "order_services.do" in the same iframe window.



Hope this help!


-Manjul


View solution in original post

2 REPLIES 2

Manjul Katare
ServiceNow Employee
ServiceNow Employee

Hi Anna,



Creating a Ui action using OnClick : window.open("order_services.do","_self"); might help you.



Please refer below screenshots:



Your UI action :


find_real_file.png



Goto a page which has the UI action.


(Note: I'm using incident_list.do as an iframe source)



find_real_file.png



When you click on the "Goto Order Services" button, it opens up "order_services.do" in the same iframe window.



Hope this help!


-Manjul


thank you for your help!