how to get url of a form of table?

ganesh32
Kilo Contributor

can anyone help me out to get url of a form?.to use this url in action.setRedirectURL(url);

for redirection.

6 REPLIES 6

amlanpal
Kilo Sage

Hi ganesh,

 

It seems you are trying to fetch the URL in the server side script. You may use action.setRedirectURL(current); or may refer the below link: 

https://community.servicenow.com/community?id=community_question&sys_id=e51d0f69db9cdbc01dcaf3231f961920

 

Hope this helps. Please mark the answer Correct/Helpful based on the impact.

Regards,

Amlan

i need to load an another form on pressing a ui action button in first form.what is the best way?

Hi Ganesh,

 

The best way is to form the URL and the redirect to that URL. In the UI Action you can do both Client side scripting as well as Server Side scripting. As I don't know what kind of scripting (Client/Server side) in your UI Action you are trying to achieve this functionality, hereby I'm giving both the solutions here.

var URL = 'https://www.google.com'; //Build your URL over here instead of Google one.

//For Server Side scripting
action.setRedirectURL(URL);

//For Client Side scripting
g_navigation.openPopup(URL);

 

Hope this helps. Please mark the answer Correct/Helpful based on the impact.

Regards,

Amlan

Alberto Consonn
ServiceNow Employee
ServiceNow Employee

Hi ganesh,

the easiest way is to right click on the form header and select Copy URL (see imabe below):

find_real_file.png

If I have answered your question, please mark my response as correct so that others with the same question in the future can find it quickly and that it gets removed from the Unanswered list.

Thank you

Cheers
Alberto