How to redirect on Module Script from Arguments?

calamity
Giga Contributor

Hey,

So I created a module and set the link type to "Script (from Arguments:)" When I click the module, it does what it's suppose to and then directs to the background script page. Is there a way for me to redirect it to another page, like the homepage or a table page? Thank you in advance.

1 ACCEPTED SOLUTION

Have you thought about using a UI page? It would be pretty simple to embed your server code in a <g:evaluate></g:evaluate> and then redirect from there. Your module would use Arguments (from URL) to call the UI page.



my_ui_page.do



I've done this before to create records and then take them to the parent record that has just been created.


View solution in original post

14 REPLIES 14

You are welcome. Let me know if you get blocked on this one.


Hi Chuck,



I remember in Eureka we were able to place some client side JavaScript in the module which would change the redirection.   It was discontinued in Fuji or Geneva.


I used the UI page method suggested by you and it worked but i wanted to know if there something in Jakarta which is similar to the functionality that we had in Eureka.


HI Ravio,



Not that I'm aware. I don't know the exact reasons why something was removed in Fuji - I strongly suspect it had something to do with scoped applications as that's when they were introduced. If that's the case, then it won't be back in Jakarta. You're welcome to try on a personal developer instance if you like. They're free! https://developer.servicenow.com


Hi Tomasi,

 

I have similar requirement but I need to redirect to portal page. Can you attache your UI page script here. Thanks in advance.

Since I don't know the full context of what your requirement is, please post it to a new question so others can see it and help as well. Thank you