exam questions

Exam CAD All Questions

View all questions & answers for the CAD exam

Exam CAD topic 1 question 24 discussion

Actual exam question from ServiceNow's CAD
Question #: 24
Topic #: 1
[All CAD Questions]

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
Show Suggested Answer Hide Answer
Suggested Answer: C 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
brianwsoares
2 weeks, 3 days ago
Selected Answer: C
https://developer.servicenow.com/dev.do#!/reference/api/vancouver/client/c_GlideUserAPI C
upvoted 2 times
...
fe91db0
2 weeks, 6 days ago
Selected Answer: C
UI actions is a server side artifact but it can also run on client. hence g_user can be used on any client side scripts
upvoted 2 times
...
Lord_Korvus
4 months ago
Selected Answer: C
- is typically used in client scripts and UI policies but is also found in UI actions that run on the client. - cannot be used in business rules or UI actions that run on the server. Source: https://developer.servicenow.com/dev.do#!/reference/api/utah/client/c_GlideUserAPI
upvoted 1 times
...
MagdaGrs
4 months, 3 weeks ago
Selected Answer: C
g_user can be used on Client Side Scripts: 1. Client Script 2. UI Policy Script 3. UI Action (if client checkbox is true)
upvoted 1 times
...
hawful
5 months, 3 weeks ago
Selected Answer: C
The correct answer is C, although GlideUser is not COMMONLY used in UI Actions, you can make a UI Action run client side. Running a UI action client side is also how you integrate GlideModal and other client operations with a UI Action. Tricky question, but the answer is C.
upvoted 2 times
...
luissevero
6 months, 4 weeks ago
Search in the doc UTAH version: "is typically used in client scripts and UI policies but is also found in UI actions that run on the client." So, the correct answer is C.
upvoted 1 times
...
schaparro
7 months, 2 weeks ago
Selected Answer: A
The link being shared says that the GlideUser API cannot be used in UI actions that run on the server. This question doesn't specify if the UI Action runs on the client or on the server. For that reason, I believe the correct answer is A. The GlideUser is typically used in client scripts and UI policies. Unless it is specified where the UI Action is running I will not assume is on the client side. A very tricky question indeed.
upvoted 3 times
...
snguru
7 months, 2 weeks ago
Selected Answer: C
"CAN" is a key word interpretation that needs to be understood for this question. "Can be used in Client Scripts, UI Policies, and UI Actions" as is mentioned below. Read these details carefully. https://developer.servicenow.com/dev.do#!/reference/api/tokyo/client/c_GlideUserAPI
upvoted 3 times
...
stophs
7 months, 3 weeks ago
Selected Answer: A
A is correct
upvoted 1 times
...
Nicknameonetwo
7 months, 4 weeks ago
C is correct - Can be used in Client Scripts, UI Policies, and UI Actions. https://developer.servicenow.com/dev.do#!/reference/api/tokyo/client/c_GlideUserAPI
upvoted 2 times
...
REENA124
11 months ago
answer is client scripts and ui policies only, Please correct the answer in website
upvoted 1 times
veniwa8015
11 months ago
you can run the ui action in client side
upvoted 1 times
...
...
REENA124
11 months ago
GlideUser The GlideUser API provides access to information about the current user and current user roles. Using the GlideUser API avoids the need to use the slower GlideRecord queries to get user information. The GlideUser methods and properties are accessed through a global object (g_user) that is only available in client scripts. GlideUser contains name and role information about the current user. is typically used in client scripts and UI policies but is also found in UI actions that run on the client. cannot be used in business rules or UI actions that run on the server. (Refer:https://developer.servicenow.com/dev.do#!/reference/api/tokyo/client/c_GlideUserAPI)
upvoted 2 times
...
raj9885
12 months ago
UI action works as both client and server side So Answer C is correct
upvoted 1 times
...
ezsy
1 year ago
A https://servicenowguru.com/scripting/user-object-cheat-sheet/#:~:text=The%20g_user%20object%20can%20be,accessible%20to%20client%2Dside%20JavaScript.
upvoted 1 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago