How to create a custom object at same time as creating new User (Account) based on their userrole

0
Is it possible to create an object at the same time as creating a new user New Account.  I'm wanting to check what the New Account's user role is and if it is a specific one then I want to be able to create that new new custom object.  I was hoping to do this as part of a customisation to the Administration.SaveNewAccount microflow.   Thanks Kath
asked
1 answers
1

Hi Kath,

What you could do is retrieve the user roles associated to the account (via association)

image.png

This will show the entire list of user roles linked to the account.

You could then add a List operation, to check if a certain role is part of this list

image.png

However, this might get broken if you decide to rename application user roles

It could be better to retrieve the specific user role from the database

image.png

And then check if the list contains this specific item

image.png

Next step would be to add a decision that uses the boolean outcome of this HasTheRole check and add a create object activity in the required flow.

 

Hope it helps 

answered