Assign a role to a user at the user creation

Working on assigning a role to a user  at the time of creation of the user. along with a temporary password to be auto generated.

but the drop down menu is not showing the data and hence the role data is not getting assigned on the save button to the user.
Could anyone please have a look.


Attaching .oml file for refernce

TestModuleV2_.oml

Solution

Dont use this.

Create another aggregate

For example this

And choose this

This way it will be possible to see all the roles.

Let me know if it helps.

Also, right now you are not giving the role to the user.

Try to create a variable to hold the value of the role.

Then when you are saving you need to call the entity action to create the role for the user

And create a variable to hold the value of the user record and then you need to fill the values with the user id and the role that you choose on the dropdown


And on the aggregate GetUserRole, it will not be possible to see the user that you created because possibly you created the user with a role from another space. So I recommend removing the filter as Paulo said.


Hi @saif sheikh 


Try adding this in the dropdown widget instead


Also in your GetuserRole aggregate, put the filters like this:

Let me know if this helps,
Paulo

Solution

Dont use this.

Create another aggregate

For example this

And choose this

This way it will be possible to see all the roles.

Let me know if it helps.

Also, right now you are not giving the role to the user.

Try to create a variable to hold the value of the role.

Then when you are saving you need to call the entity action to create the role for the user

And create a variable to hold the value of the user record and then you need to fill the values with the user id and the role that you choose on the dropdown


And on the aggregate GetUserRole, it will not be possible to see the user that you created because possibly you created the user with a role from another space. So I recommend removing the filter as Paulo said.


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