- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-22-2015 02:20 AM
Hello Everyone,
I am trying to redirect a URL by using action.serRedirectURL(url);
But when I use this function in UI action it redirects me to the specified URL but into a new window / Tab and not in the same window.
I want, it to open in same window / tab.
Please let me know your suggestions on same.
Thank You
Vineet
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-10-2015 12:34 AM
Hello Everyone,
Got the reason why I was getting redirected to new tab / window.
Earlier I was using the below url for redirecting:
var url = "https://<instance-name>/$m.do#/form/sc_req_item/"+current.sys_id+"/sysparm_view=Mobile";
action.setRedirectURL(url);
But instead, have to use the URL in the following form and which helped me to redirect on the same tab / window.
var url = "#/form/sc_req_item/"+current.sys_id+"/sysparm_view=Mobile";
action.setRedirectURL(url);
i.e. just the url from "#/form" excluding the <instance-name> part.
Thank you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-27-2015 12:01 AM
Hi Berny,
But, if I am not wrong is it possible to have UI Action of client type in case of Mobile UI Actions?
Also, "new_record" how this works, do I have to write a code which redirects via GlideRecord..?
Thanks
Vineet
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-27-2015 12:05 AM
Hi Berny,
Actually I am using the below code for redirecting:
action.sendRedirectURL("https://<instance-name>/$m.do#/form/sc_req_item/"_current.sysapproval.sys_id);
i.e. trying to redirect to the current record from list of records under "My Approvals".
Please let me know your observations on same.
Thank You
Regards
Vineet
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-29-2015 09:07 AM
Hi All,
I have tried the client version of UI Action as well.
I have actually created a UI Action on "sc_req_item" form and have written the following code:
client check box: true
Onclick: RevertbackApp()
script:
function RevertbackApp()
{
window.open("https://<instance-name>/$m.do#/form/sc_req_item/"+current.sys_id+"/sysparm_view=Mobile","_self");
}
And I have made this UI Action to be visible on Mobile View on "sc_req_item" form as well.
But the problem is I am not getting the UI Action on Mobile interface.
Please provide your suggestions on same.
Thank You
Regards
Vineet Kumar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-10-2015 12:34 AM
Hello Everyone,
Got the reason why I was getting redirected to new tab / window.
Earlier I was using the below url for redirecting:
var url = "https://<instance-name>/$m.do#/form/sc_req_item/"+current.sys_id+"/sysparm_view=Mobile";
action.setRedirectURL(url);
But instead, have to use the URL in the following form and which helped me to redirect on the same tab / window.
var url = "#/form/sc_req_item/"+current.sys_id+"/sysparm_view=Mobile";
action.setRedirectURL(url);
i.e. just the url from "#/form" excluding the <instance-name> part.
Thank you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-10-2015 12:37 AM
Great to hear your were able to get it solved. Thanks for sharing the solutions Vineet!
Thanks,
Berny