ServiceNow Certified Application Developer — Question 9

In a Business Rule, which one of the following returns true if the currently logged in user has the admin role?

Answer options

Correct answer: B

Explanation

The correct answer is B because `gs.hasRole('admin')` checks if the current user has the admin role, which is applicable in a Business Rule context. Option A and C are incorrect as they pertain to the form and do not reflect the user's roles in the Business Rule. Option D is also incorrect as `gs.hasRoleExactly('admin')` checks for the exact role without any additional roles, which is not the requirement here.