ServiceNow Certified Application Developer — Question 167

Which method call returns true only if the currently logged in user has the catalog_admin role and in no other case?

Answer options

Correct answer: B

Explanation

The correct answer is B, g_user.hasRoleExactly('catalog_admin'), as it checks if the user has only that specific role without any others. Option A returns true if the user has the role but does not check for exclusivity. Options C and D do not exist in the ServiceNow API, making them invalid choices.