How to get current page URL when clicked the UI action
- 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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-18-2019 10:02 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-18-2019 09:47 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-18-2019 11:53 PM
any update on this thread?
if i answered your query , kindly mark my answer as correct and close this thread.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-19-2019 01:49 AM
Hi Ramesh,
What is your exact requirement here?
It seems in the UI action you are just want to get the url; show alert and then in server side code of UI action redirect to current record.
Mark ✅ Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.
Thanks
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader