- 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:48 AM
Try this in your you 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 href="https://<instance-Name>.service-now.com/ui_page.do?sys_id=<sys_id_of_other_ui_page>" target="_blank">Open Other UI Page</a>
</j:jelly>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-17-2022 06:01 AM
Hello,
I tried this already :
<g:ui_form>
<g:evaluate var="jvar_sysId" expression="RP.getWindowProperties().get('sysparm_sys_id')"/>
<p>test</p>
<a href="ui_page.do?sys_id=5845a47c9702111020a277d71153af7a"> click here </a>
</g:ui_form>
The sys id mentioned above is the id of the second ui page. This is opening a new tab. I want to display it as ui page of specified size..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-17-2022 06:09 AM
Client Callable UI Action
function onClick() {
var gdw = new GlideDialogWindow('warning_submit', false, 550, 550);
gdw.setPreference('sysparm_sys_id', g_form.getUniqueValue());
gdw.render();
//g_form.setValue('state', '2');
//g_form.save();
}
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">
<g:ui_form>
<g:evaluate var="jvar_sysId" expression="RP.getWindowProperties().get('sysparm_sys_id')"/>
<a href="ui_page.do?sys_id=5845a47c9702111020a277d71153af7a">Open Other UI Page</a>
</g:ui_form>
</j:jelly>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-17-2022 06:29 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.
I have specified the page size in ui action
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-18-2022 02:03 AM
Can you share the details of what have you tried?