B (https://developer.servicenow.com/dev.do#!/learn/courses/washingtondc/app_store_learnv2_scripting_washingtondc_scripting_in_servicenow/app_store_learnv2_scripting_washingtondc_client_side_scripting/app_store_learnv2_scripting_washingtondc_the_glideuser_g_user_class)
The g_user.hasRoleExactly() method in ServiceNow is used to check if the currently logged-in user has a specified role and no other roles. In this case, it checks if the user has the 'catalog_admin' role and no other roles.
So, the correct method call to return true only if the currently logged-in user has the 'catalog_admin' role and in no other case is g_user.hasRoleExactly('catalog_admin')
Correct answer is B, g_user.hasRoleExactly()
Please find this g_user.hasRoleOnly() client side script that you speak of in the below ServiceNow documentation. I can wait. :D
Source: https://developer.servicenow.com/dev.do#!/reference/api/utah/client/c_GlideUserAPI
Can you guys update the correct answer? So far I've seen the "correct answer" be incorrect a little too many times and I'm not even a quarter of the way through these questions....the correct answer is B!!!
This section is not available anymore. Please use the main Exam Page.CAD Exam Questions
Log in to ExamTopics
Sign in:
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.
kundgir
Highly Voted 3 years, 7 months agonsmcan
Highly Voted 3 years, 6 months agoarango
Most Recent 2 days, 6 hours agoNisha2706
8 months, 2 weeks agochuks100
10 months, 4 weeks agoKlahr
11 months agomanikanta_gnbv
1 year, 1 month agoevoken
1 year, 3 months agoBugPanda
1 year, 5 months agobrutaltea
1 year, 6 months agoLord_Korvus
1 year, 8 months agoMru9
1 year, 8 months agoAnu_K
1 year, 8 months agostophs
1 year, 11 months agoKAAAAARIM
2 years, 4 months agog_user
2 years, 5 months agoJackLopez
2 years, 5 months ago