In a business rule what returns true if the currently logged in user has the admin role?

Prepare effectively for the ServiceNow CAD certification. Study with detailed questions and explanations. Enhance your skills and knowledge for success in your exam!

Multiple Choice

In a business rule what returns true if the currently logged in user has the admin role?

Explanation:
To check if the currently logged-in user has the admin role, use the server-side function that queries role membership by name: gs.hasRole('admin'). The admin role in ServiceNow is named admin, so this call returns true when that exact role is assigned to the user. This directly tests the user’s role, which is exactly what you want in a business rule. The other options don’t fit: gs.hasRole('administrator') would look for a role with that name, which isn’t the standard admin role name; gs.hasPrivilege checks a privilege rather than a role membership; and gs.canAccess isn’t a valid server-side function.

To check if the currently logged-in user has the admin role, use the server-side function that queries role membership by name: gs.hasRole('admin'). The admin role in ServiceNow is named admin, so this call returns true when that exact role is assigned to the user. This directly tests the user’s role, which is exactly what you want in a business rule.

The other options don’t fit: gs.hasRole('administrator') would look for a role with that name, which isn’t the standard admin role name; gs.hasPrivilege checks a privilege rather than a role membership; and gs.canAccess isn’t a valid server-side function.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy