Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Edit hyperlink such that it takes current session language

Uttam Sai
Tera Expert

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

diogovdcandrade
Tera Contributor
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);