How to get the full URL when it has already been encoded in a ServiceNow client script?

Nguyen Van Au
Tera Contributor

Is there any way to get the ServiceNow URL in a client script? I tried: sysparmQuery = g_form.getParameter('sysparm_query'); But it didn’t work as expected. Is there another way to get the value of `classification` from the URL? For example, the URL:

1.

https://dev123408.service-now.com/now/nav/ui/classic/params/target/_to_do_comment.do%3Fsys_id%3D-1%2...

2. https://dev123408.service-now.com/_to_do_comment.do?sysparm_query=_computer_information%3D__ENC__ZjZ...
I need to get the value of `classification`.
please help me,

1 ACCEPTED SOLUTION

@Nguyen Van Au 

did you print what came in alert using this?

alert(top.location.href);

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

5 REPLIES 5

@Nguyen Van Au 

did you print what came in alert using this?

alert(top.location.href);

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader