In a Business Rule, which one of the following returns true if the currently logged in user has the admin role?
A. g_form.hasRoleExactly(‘admin’)
B. gs.hasRole(‘admin’)
C. g_form.hasRole(‘admin’)
D. gs.hasRoleExactly(‘admin’)
In a Business Rule, which one of the following returns true if the currently logged in user has the admin role?
A. g_form.hasRoleExactly(‘admin’)
B. gs.hasRole(‘admin’)
C. g_form.hasRole(‘admin’)
D. gs.hasRoleExactly(‘admin’)
Answer B:
Question is for Business Rule hence server-side. g_form is Client-side.
A. g_form.hasRoleExactly(‘admin’) – Client side – non applicable to Business Rule.
B. gs.hasRole(‘admin’) – true
C. g_form.hasRole(‘admin’) – Client side – non applicable to Business Rule.
D. gs.hasRoleExactly(‘admin’) – Doesn’t exist – returns undefined.
For admins, gs.hasRole() always returns true.
gs.hasRoleExactly() is not available OOTB. The hasRoleExactly function is only available on the client side:
g_form.hasRoleExactly(). It will return true only when the user has the role, even if they are admins.
What is up with this site’s answers? A business rule is server side and therefore has no access to g_form … C cannot be correct.
B