- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-17-2022 05:14 AM
Hi,
Can i trigger a ui page from another ui page ?
I have an existing ui page : Page 1
In my new ui page i need to display a hyperlink on click of which it should redirect to page 1.
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-19-2022 12:37 AM
Now it is better.
UI Action
UI Page
Use this script in the HTML/XML of your first UI Page.
<?xml version="1.0" encoding="utf-8" ?>
<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">
<a onClick="openOtherUIPage()">Open Other UI Page</a>
</j:jelly>
Use this in the Client Script of your first UI Page.
function openOtherUIPage() {
var gdw = new GlideDialogWindow('<other_ui_page_name>');
gdw.setSize(550, 550);
gdw.render();
}
See the below image for reference.
Results
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-17-2022 05:27 AM
Hi, Please try below code
1st UI page => HTML
<?xml version="1.0" encoding="utf-8" ?>
<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">
<g:ui_form>
<p>Please check below to call other UI page</p>
<p>Click OK to run the processing script.</p>
<g:dialog_buttons_ok_cancel ok="return true" />
</g:ui_form>
</j:jelly>
Processing script
response.sendRedirect("ui_page.do?sys_id==<sys_id_of_second_ui_page>");// sys_id of other page that you want to call.
Please mark this as correct answer and helpful if it resolved, or mark this helpful if this help you to reach towards solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-17-2022 05:32 AM
Hello Kalyani
Is there a way to call from <p> itself instead of button?
Like :
<p>Click <Some text></p>
This <some text> should be a link redirecting to the existing ui page(page 1).
I have tried this already :
<p>test</p>
<a href="ui_page.do?sys_id==5845a47c9702111020a277d71153af7a" target="_blank"> click here </a>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-17-2022 05:55 AM
In HTML add below code
<g:ui_form>
<a href="https://dev64444.service-now.com/ui_page.do?sys_id=0ac0ac3c2f06d110652e351ef699b635">Please click on another UI Page</a>
//your instance id and sys_id of another UI page
</g:ui_form>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-17-2022 06:03 AM
Hello,
The problem i am facing with this is it is opening the ui page in new tab.
I want to display it as a ui page of specified size.