Transfer with existing case number: Links not redirecting

wysenk
Tera Contributor

Hi, we are implementing the feature to transfer with existing case number. However, we are realizing that if we have a notification that gets sent to a user, the URL on the notification (which will contain the sysid of the initial case) will direct the user to view the 'cancelled case' on the portal. 

 

Is there a way we can redirect the user via backend logic such that no matter which link they clicked on, the system will display the latest case details when the user is viewing it on the portal?

3 REPLIES 3

Wessel van Enk
Tera Guru
Tera Guru

Hi, this is due to the fact that the sys_id of the previous case is mentioned in the URL.
You need to create a mail script to add the sys_id of the new case to the URL and sent that in the notification. 

 

Something like this:

template.print(gs.getProperty('glide.servlet.uri') + gs.getProperty("com.csm.demohub.portal.b2b.emailRedirectionUrl") + '?id=csm_ticket&table=sn_customerservice_case&sys_id=' + current.getUniqueValue() + '&view=csp');
 
So, in the code you need to add the property where you store the URL of the portal, the view name of the view case on the portal and then the sys_id of the new case. 
 

wysenk
Tera Contributor

Hi Wessel, thanks for the response. That experience, where the user gets another notification, will not be ideal as the requestor need not know that we are changing the HR Service. Ideally, it will be great if the system can redirect the user to the latest version; similar to the experience that we are getting with Knowledge. 

Hi, I understand, but as the sys_id is changing, you need to modify the sys_id in the URL, otherwise it will always show the old record. That's the issue with creating new records, as cases don't work like the KB articles with versions. 

What you can consider for this is using Universal Requests. That way, the end-user always has one reference record to see all attached sub-cases or services. See this link for more info:
https://docs.servicenow.com/csh?topicname=ur-landing-limitedaccess.html&version=latest