List all Roles in a dropdown
Application Type
Reactive
Service Studio Version
11.10.10 (Build 38781)

Hello,

I am creating user for my application, and I want they can login and use the platform.

So create a entity for save all information I need and a UserId. When I create a new user I create dynamically first in Users Entity by CreateUser method and then I put it in my entity with the Id I received from Users Application. This is working well.

In the next step I want to be able to add a Role for my new users. I decided to have a dropdown with a list of all roles that I have. My problem is how can I get this list to fill my dropdown.

Any ideas?


Solution

Hi Pedro,

You could use the Role entity: Documentation

It is in (System) -> Entities -> Database -> Role. The User_Role Table is there too.

Hope it helps

Best regards

Thank you.

Hi,

In UserRole, you have UserId and RoleId ,so based on logged In UserId you can find all the RoleId's and then based on RoleId's From Role entity you can directly fetch all the role list.


Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.