Scoped application ... var language =gs.getUser().getLanguage() not working

Zod
Giga Guru

Hi,

I'm quit new to the scoped application thing .. . It looks like I can not use "var language =gs.getUser().getLanguage();" within a scoped business rule to get the language of the user logged in.

How to adjust?

Thank you!

1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron
Tera Patron

Hi Vemffm,



There is some issue in getting user's language in scoped app using above code.


Can you try this in your business rule and check:



var session = gs.getSession();


var language = session.getLanguage();


gs.info(language);



Mark Correct if this solves your issue and also hit Like and Helpful if you find my response worthy based on the impact.


Thanks


Ankur


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

View solution in original post

2 REPLIES 2

Ankur Bawiskar
Tera Patron
Tera Patron

Hi Vemffm,



There is some issue in getting user's language in scoped app using above code.


Can you try this in your business rule and check:



var session = gs.getSession();


var language = session.getLanguage();


gs.info(language);



Mark Correct if this solves your issue and also hit Like and Helpful if you find my response worthy based on the impact.


Thanks


Ankur


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

Ankur Bawiskar
Tera Patron
Tera Patron

Hi Vemffm,



Can you also mark my answer as correct, helpful if you were able to achieve your requirement. This helps in removing this question from unanswered list.


Thanks in advance.



Regards


Ankur


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