function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
NyshaaNyshaa 

How can I randomly assign a user to a field.

I have a field name sales representative (Lookyp User).I have 4 users.
I want to assign randomly 3 users to the field.

Can this be done using the automaton tool like flow or process builder.

Thanks in Advance!

VinayVinay (Salesforce Developers) 
Hi Nyshaa,

You can achieve this by using process builder but you would need to define the user's to populate on the lookup field.

Check below references that can help you with your implementation

https://help.salesforce.com/articleView?id=000337963&type=1&mode=1
https://trailblazers.salesforce.com/answers?id=9063A000000ifa6QAA
https://trailblazers.salesforce.com/answers?id=9063A0000019SSoQAM

Thanks,
NyshaaNyshaa

Hi Vinay,

I want to randomly select 3 users out of 4users. If I have t define the user then that wouldn't be called as a randomly selected user right?

Do you have another alternative solution.

Thanks!

VinayVinay (Salesforce Developers) 
You would need to implement custom logic to populate users randomly on the lookup field.

Try below example
https://developer.salesforce.com/forums/?id=906F00000005Hz6IAE

Thanks