ExamGecko
Question list
Search
Search

Question 24 - CAD discussion

Report
Export

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

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

Explanation:

The following is true for GlideUser (g_user) methods:

Can be used in Client Scripts, UI Policies, and UI Actions. This is true because GlideUser (g_user) methods are part of the client-side scripting APIs that provide information about the current user and the user's preferences. Client Scripts, UI Policies, and UI Actions are all types of client-side scripts that run in the web browser and manipulate the user interface.

The following are not true for GlideUser (g_user) methods:

Can be used in Client Scripts and UI Policies only. This is false because GlideUser (g_user) methods can also be used in UI Actions, which are another type of client-side scripts that can be triggered by a user's click on a button, link, or choice.

Can be used in Business Rules only. This is false because GlideUser (g_user) methods cannot be used in Business Rules, which are server-side scripts that run on the ServiceNow platform and manipulate the database. Business Rules use a different API to access the current user information, which is GlideSystem (gs).

Can be used in Business Rules, and Scripts Includes. This is false because GlideUser (g_user) methods cannot be used in Business Rules or Script Includes, which are both server-side scripts. Script Includes are reusable units of code that can be called from any server-side script. Script Includes also use GlideSystem (gs) to access the current user information.References:Client-Side Scripting APIs, GlideUser, Business Rules, Script Includes

asked 23/09/2024
Tamas Szekely
36 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first