URL is getting Updated after clicking in notification

learnerJohns
Tera Expert

i have created a notification & there i have added a hyperlink 

 

Users URL which I have updated on the hyperlink in notification : https://XXXXXX:0000/sap(bD1lbskljdlasxMCZkPW1pbg==)/bc/bsp/sfp/crm_ui_start/default.htm

 

But When i click on the notification then it goes to ->
https://XXXXXX:0000/sap%28bD1lbiZjPTAxMCZkPW1pbg==%29/bc/bsp/sfp/crm_ui_start/default.htm

 

( -> %28
) -> %29

above () is getting replaced with %28 & %29

 

Can you please guide me what can I do here

3 ACCEPTED SOLUTIONS

Tanushree Maiti
Tera Patron

Hi @learnerJohns 

 

Instead of hardcoding the URL directly in the HTML source, consider using a ServiceNow Notification Email Script to dynamically construct and inject the URL and related variables. This approach is more maintainable and helps avoid issues where the HTML editor automatically modifies or escapes special characters, such as parentheses.

 

"If you wish to have a straight forward method of providing a link to a record or referenced record within your Email Notification, then you can utilise ${URI} and ${URI_REF}. However if you wish for more flexibility to customise how the link to the record should be constructed (ie. hyperlink text, instance/custom url, additional parameters, etc) then you can utilise getLink() within your Email Script."

 

Refer: KB2527312 URI vs URI_REF vs getLink() 

https://servicenowguru.com/email-notifications-system-definition/email-links-uri-uriref/

Please Accept the solution if it assisted you with your question & Mark this response as Helpful.
Regards
Tanushree Maiti
ServiceNow Technical Architect
LinkedIn: https://www.linkedin.com/in/tanushreemaiti

View solution in original post

Tried all, but nothing worked.. not sure what i missed.

Any other suggestions ?

View solution in original post

Ankur Bawiskar
Tera Patron

@learnerJohns 

how is the link added? directly in message HTML or via email script?

share that

Also that link is for which record?

Looks like it's an external URL

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

View solution in original post

3 REPLIES 3

Tanushree Maiti
Tera Patron

Hi @learnerJohns 

 

Instead of hardcoding the URL directly in the HTML source, consider using a ServiceNow Notification Email Script to dynamically construct and inject the URL and related variables. This approach is more maintainable and helps avoid issues where the HTML editor automatically modifies or escapes special characters, such as parentheses.

 

"If you wish to have a straight forward method of providing a link to a record or referenced record within your Email Notification, then you can utilise ${URI} and ${URI_REF}. However if you wish for more flexibility to customise how the link to the record should be constructed (ie. hyperlink text, instance/custom url, additional parameters, etc) then you can utilise getLink() within your Email Script."

 

Refer: KB2527312 URI vs URI_REF vs getLink() 

https://servicenowguru.com/email-notifications-system-definition/email-links-uri-uriref/

Please Accept the solution if it assisted you with your question & Mark this response as Helpful.
Regards
Tanushree Maiti
ServiceNow Technical Architect
LinkedIn: https://www.linkedin.com/in/tanushreemaiti

Tried all, but nothing worked.. not sure what i missed.

Any other suggestions ?

Ankur Bawiskar
Tera Patron

@learnerJohns 

how is the link added? directly in message HTML or via email script?

share that

Also that link is for which record?

Looks like it's an external URL

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