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
Ravi sastriRavi sastri 

Update Lead Owner When Custom Picklist field on Lead is Updated

Hello Admins and Develpers,
I have a task where the Lead Owner field should be updated when Account Owner field on Lead is updated. This field contains names of users. When a user is selected from Account owner picklist, the lead owner should change to that user. I do have a trigger but I wanna try this out without a peice of code. Can anyone help me with developing workflow rules or process builder in order to achieve this.
HARSHIL U PARIKHHARSHIL U PARIKH
I think you need to create this process builder since it cntains multiple if and else statements. Workflow wouldn't be a great solution for this. Your if and else statements depends on however many list of AccountOwners you have.

Create a process builder which says whenever AccountOwner is changed update the LeadOwner field based on following,
If TEXT(AccountOwner) is equals to "John Doe" then LeadOwner is User.Id -- This will be John Doe's UserId
If TEXT(AccountOwner) is equals to "Mark Smith" then LeadOwner is User.Id -- This will be Mark Smith's UserId

Please refer to this link: https://help.salesforce.com/articleView?id=000220643&language=en_US&type=1

Hope this helps!