I want to fetch the "id" in URL from request type dynamically, instead of hardcoding.

Community Alums
Not applicable

Hi All,
I want the user to be directed to ESC portal, for that I build the URL, there I am trying to fetch the details like sysId and table class name dynamically. But I am not getting how to fetch the "id"(red colored.

https://servicenow_my_instance/esc?id=ticket&table=incident&sys_id=000058a3472b29103e7ea31c016d43a8

Kindly Guide how to fetch this id based on request type like incident, request item, request, problem, change etc.

Thanks

7 REPLIES 7

Community Alums
Not applicable

Hi @Mayur2109 
Can you pls elaborate, how this can help me.
Because I want this
I don't want to debug the URL. But I want to know how this id is coming. Because it is changing as per request type, like for request it is order_status, for incident it is ticket. So I want to know how we can know on the basis of table class that id will be what?
Thanks

Hi @Community Alums ,

 

This id refers to page (sp_page_list) record in service portal application. You can refer page details for more understanding.

Screenshot (59).png

If you want to know how this page ID is changing you need to check each element in widget editor which you click which changes page id.

 

Please check and Mark Helpful and Correct if it really helps you.

Regards,
Mayur Shardul

Community Alums
Not applicable

Hi @nowgpt1 
I don't want sys_id or number. I think you assess it wrong.
Let me clear it out:
I want to know how this id is coming. Because it is changing as per request type, like for request it is order_status, for incident it is ticket. So I want to know how we can know on the basis of table class that id will be what?