How can i split a url and take out the sys_id value and use in a variable.

arun124
Kilo Contributor

URL=ServiceNow

https://dev17964.service-now.com/incident.do?sys_id=d71da88ac0a801670061eabfe4b28f77&sysparm_view=&s...

I want to take the url of the current page and get the value of sys_id used in the url .

How to get the value of sys_id if I want to use it my script?

6 REPLIES 6

Hi Karun,



Have you checked it? Were you able to resolve your issue?



Thanks


Please Hit like, Helpful or Correct depending on the impact of the response


lks
ServiceNow Employee
ServiceNow Employee

Please try using gs.action.getGlideURI().get('sys_id') and let me know if it answer your purpose?