When you select the FrameworkUser for the BoUser base class, the business object has
access to four functions. You can use these functions for edit and access rights based on user
roles. The FrameworkUser class is only available via the class from which it’s extended, that is,
BoUser.
Required Editions
Available in Lightning Experience in Professional, Unlimited, and
Enterprise Editions that have Consumer Goods Cloud enabled.
setRoles(roles)
hasRole(role)
hasOneRoleIn(roles)
hasAllRolesIn(roles)
Related topics
Role-based E&A rights
hasAllRolesIn(roles) This function accepts either comma-separated strings or an array of strings. It returns true if you assign all the roles to the user.
hasOneRoleIn(roles) This function accepts either comma-separated strings or an array of strings. It returns true if you assign at least one role to the user.
hasRole(role) This function accepts a role name string and checks whether it is among the known roles of the current application user.
setRoles(roles) Use this function to store the role names that are available in the input parameter of the framework user object.
Did this article solve your issue?
Let us know so we can improve!
Loading
Salesforce Help | Article
Cookie Consent Manager
General Information
Required Cookies
Functional Cookies
Advertising Cookies
General Information
We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required Cookies
Always Active
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional Cookies
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising Cookies
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.