Make the url a short link in URL type field in servicenow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-19-2024 03:55 AM - edited 07-21-2024 10:41 PM
Hi team,
I need some help in shortening the url mentioned under URL type field.
I have a URL type field and under calculated section with calculation type as script and created the dynamic url. I have given the script something as below:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-19-2024 06:01 AM - edited 07-19-2024 06:18 AM
If not already enabled, install the Tiny URL Support plugin (com.glide.tiny_url) by following this this:
Set the various System properties to the values you require. Make sure 'glide.use_tiny_urls' is set to true
glide.tiny_url_min_length (Optional: you only need to create/set it if the standard (1024 chars) is no good.)
and then just use the sys_tiny_url table for your own links create the entries in that table using your script.
Set the tiny_url column to whatever string you want e.g. mytinyurltest
construct your link in your script and place it in the data column of the same record (referencing whatever your tiny_url value used above was) on the sys_tiny_url table
Put your script generated link in the data column e.g.
Regards
Paul