Can i assign a particular role with respect to some form field value ?? I want to assign a role profile with a user invitation.
Let’s say, I have a custom doctype Manager and have implemented the workflow for sending user invitation while we create a new manager(Button Invite as User will be visible when i save this doctype).
Now i have one select field in manager doctype. It has some values like Showroom Manager, Admin, Customer.
These are like different roles. I have created corresponding roles also. So when i select Showroom Manager and click on Invite as User button, the corresponding role should be assigned to that user along with user creation.
How can i achieve this ??