How can we send Configurable Workspace URLs in notifications?

alrescate
Tera Contributor

The URLs generated in notification emails take you to the target record in Core UI.

 

We're moving our users to SOW and CSM/FSM Configurable Workspaces and these email notifications are undermining our efforts to get users away from Core UI.

 

The notification templates call Email Scripts that use the getLink() method on the current record to get the URL.
How can we change the URL so that it directs our users to the configurable workspace of our choice?

4 REPLIES 4

James Chun
Kilo Patron

Hi @alrescate ,

 

There could be a better way or an OOTB API to get the URL, but you can hardcode the path to the workspace, something like below:

 

 

return gs.getProperty('glide.servlet.uri') + "/now/sow/record/" + recordTable + "/" + recordSysId;

 

 Hope it helps!

 

Thanks

Hi James,

 

Linking the user to a record view is straightforward since the URL contains the table name and record sys id.

 

Do you know a good way to generate the URL that can link the user to a list view in the workspace? 

The list view URL seems to be less direct with some IDs that I am not sure where it comes from - something like this: instance.service-now.com/now/cwf/agent/list/params/list-id/060a4b3a53b81010d4f9ddeeff7b129a/tiny-id/pSw37e8v2fCb8IkWlRZDYWy4LPuCTLCc

I like to be able to craft a URL that can link users to a workspace list just as easily as how a classic list URL can be crafted with query conditions.

 

 

Regards,

Wei

abirakundu23
Mega Sage

Hi @alrescate ,

Please try below once:

return '<a href="' + gs.getProperty('glide.servlet.uri')+'now/workspace/hr/record/' + current.getTableName() + '/' + current.sys_id + '">

 

Please mark helpful & correct answer if worthy for you.

chetanb
Tera Guru

@alrescate 

Did you get a chance to look at -https://www.servicenow.com/community/hrsd-forum/customize-agent-workspace-notifications/m-p/1315313

https://www.servicenow.com/community/mobile-apps-platform-forum/how-do-i-configure-a-url-in-a-notifi...

 

if my answer has helped with your question, please mark my answer as accepted solution and give a thumb up.

 

Regards,

CB