Building URL dynamically to view a RITM in 'Workspace mode

peterengel
Tera Contributor

I am trying to build an URL to open a RITM  in ServiceNow (Workspace mode)

When opening the RITM directly from servicenow,the following URL is presented: 

RITM0086545 | Service Operations Workspace | ServiceNow

 

How can I create this URL dynamically for opening the desired RITM (RITM0086545)? 

 

I do know how to open the RITM in 'classic mode'. But that is a very inefficient user-interface for us; 

start msedge "https://<server>/now/nav/ui/classic/params/target/sc_req_item.do?sys_id=<RITM-number>"

I need a similar script to open the RITM in 'workspace-mode'

 

 

 

12 REPLIES 12

You can fetch the sys_id using the Table API by querying with the RITM number, and then use that sys_id to build your workspace URL.

You can call the API like this

https://<instance>/api/now/table/sc_req_item?sysparm_query=number=RITM0086545&sysparm_fields=sys_id

This will return the matching record and its sys_id.

Then you can construct the workspace URL like

https://<instance>/now/sow/record/sc_req_item/<sys_id>

Make sure you are using a ServiceNow user with API access to call this. The user should be active, allowed for web service access, and have read access to the sc_req_item table, otherwise the API call will not return results.

Table API: Table API • Australia API Reference • Docs | ServiceNow

Thank you again.  But still I can not continue because of authorisation. 
Wouldn't it be a lot easier when SOW should be functioning similar to NAV? There we do not need the sys_id.  The sys_id is collected within ServiceNow by sending the RITM-number.  (../sc_req_item.do? sys_id-<RITM-number>) 

Why this difference between SOW and NAV?  The user interface for NAV is not efficient for us. We like the SOW-user-interface and want to show our RITM's using that UI.


Is that a big change for you?  

@peterengel 

I believe your question should be to ServiceNow why it has a limitation when it comes to workspace

Please raise a case with ServiceNow and share this

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

Ankur Bawiskar
Tera Patron

@peterengel 

what do you mean by workspace mode?

in SOW you want to open?

if yes then you can have like this

now/sow/record/sc_req_item/<sysId>

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

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

In Servicenow you can go to "Workspaces > Service Operations Workspace" (top menu-bar).

When you open a RITM there, it has a much better and user-friendly user-interfasce where you do not have to scroll through a lot of data to come to the tasks.
So Yes, I probably mean SOW.
No, your response did not help. Still the RITM is NOT opened. It looks like we need need a '<sysid> ' but I only have a RITM-number be be opened. The sys-id is some pointer-ID I guess?  That is not understandable by humans.  
In our other application we communicate using the RITM-numbers. From that application we want to start ServiceNow and open the selected RITM. So the question is how to get the <sysid> corresponding with the RITM. 
We do have a script that works for opening the RIM in CLASSIC-mode. But that is a terrible user-interface. 
 'start msedge "https://<server>/now/nav/ui/classic/params/target/sc_req_item.do?sys_id=<RITMcode>"':U 
<Server>  and <RITMcode>  will be replaced with the correct values. Something similar I need for SOW.