Correct Answer for the below

Snow preck
Tera Contributor

50.Which one of the following is true for GlideUser (g_user) methods?


A. Can be used in Client Scripts and UI Policies only
B. Can be used in Business Rules only
C. Can be used in Client Scripts, UI Policies, and UI Actions
D. Can be used in Business Rules, and Scripts Includes

4 REPLIES 4

Deepak Shaerma
Kilo Sage

Hi @Snow preck 

 

C. Can be used in Client Scripts, UI Policies, and UI Actions

 

The GlideUser object, accessible via g_user, is a client-side API in that provides methods to interact with the current user’s session and properties. It is specifically designed to be used in client-side contexts such as Client Scripts, UI Policies, and UI Actions. It cannot be used in server-side scripts like Business Rules or Script Includes.

 

please mark this Helpful and Accepted Solution if this helps you. Your action will help me and the community in understanding same requirements.

Thanks & Regards

Deepak Sharma

Sandeep Rajput
Tera Patron
Tera Patron

@Snow preck C. Can be used in Client Scripts, UI Policies, and UI Actions

Yashsvi
Kilo Sage

Hi @Snow preck,

.Which one of the following is true for GlideUser (g_user) methods?


A. Can be used in Client Scripts and UI Policies only
B. Can be used in Business Rules only
C. Can be used in Client Scripts, UI Policies, and UI Actions
D. Can be used in Business Rules, and Scripts Includes

 

Correct Answer - C(Can be used in Client Scripts, UI Policies, and UI Actions)

 

Thank you, please make helpful if you accept the solution.

SN_Learn
Kilo Patron
Kilo Patron

Hi @Snow preck ,

 

The correct answer is:

C. Can be used in Client Scripts, UI Policies, and UI Actions

ServiceNow reference: GlideUser 

 

Please Mark My Response as Correct/Helpful based on Impact

 

----------------------------------------------------------------
Mark this as Helpful / Accept the Solution if this helps.