How to get current page URL when clicked the UI action
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-18-2019 08:54 AM
Hi All,
I want to get current page URL when click on the current URL in UI Actin
I wrote
function moveToAuthorize() {
var url = document.URL.parseQuery();
alert(url);
gsftSubmit(null, g_form.getFormElement(), "state_model_move_to_scheduled");
}
if (typeof window == 'undefined')
updateAndRedirect();
function updateAndRedirect() {
var url = gs.action.getGlideURI();
gs.addInfoMessage(url);
action.setRedirectURL(current);
}
this script but its not working
Labels:
8 REPLIES 8
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-18-2019 08:57 AM
Hello Ramesh,
Probably a system property glide.servlet.uri would help you achieve it.
Please mark as Correct Answer and Helpful, if applicable.
Thanks!
Abhishek Gardade
Hexaware Technologies
Thank you,
Abhishek Gardade
Abhishek Gardade

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-18-2019 08:58 AM
You can use the following:
var gURL = new GlideURL();
gURL.setFromCurrent();
// you can get params by doing the following
var param = gURL.getParam("parameter_in_url");
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-18-2019 09:03 AM
Try
function moveToAuthorize() {
var url = window.parent.location.href;
//var url = document.URL.parseQuery();
alert(url);
gsftSubmit(null, g_form.getFormElement(), "state_model_move_to_scheduled");
}
if (typeof window == 'undefined')
updateAndRedirect();
function updateAndRedirect() {
var url = gs.action.getGlideURI();
gs.addInfoMessage(url);
action.setRedirectURL(current);
}
Please mark my response as correct and helpful if it helped solved your question.
-Thanks
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-18-2019 09:06 AM