Edit hyperlink such that it takes current session language
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-14-2023 03:35 AM
Hi Team,
I have been using a hyperlink which shows a Knowledge Article in language added to hyperlink(sysparm_language=cs) - https://uttamqa.service-now.com/kb_view.do?sysparm_article=KB0010582&sysparm_language=cs
In above example, i have added language as czech. I want to change the link such that it takes current session's language . Please help me with the requirement.
Thank you
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-14-2023 07:16 AM
I believe you'd need a client script that gets the current language
var currentLanguage = gs.getUser().getPreference('glide.sys.language');
then you'd concatenate base url with current language
base_url ='https://uttamqa.service-now.com/kb_view.do?sysparm_article=KB0010582&sysparm_language='
var link = base_url + currentLanguage;
you can now use link as you need
gs.info(link);