Skip to main content Stream TDX Bengaluru on Salesforce+. Start learning the critical skills you need to build and deploy trusted autonomous agents with Agentforce. Register for free.

Hello all - 

 

I'm trying to create a validation rule for Leads that will prevent users from changing the Lead Owner to one of our Queues. What is the best way to write a rule for that but still allow them to change the Lead Owner to other users? 

8 answers
  1. Aug 31, 2022, 3:03 AM

    If you just want to block Non-Admins from transferring any Lead to 1 specfic Queue you could use 

     

    AND(

    $Profile.Name <> 'System Administrator',

    ISCHANGED(OwnerId),

    Owner:Queue.QueueName = 'Who Owes SteveMo a Beer?'

    )

  2. Aug 30, 2022, 7:51 PM

    @Steve Molis One specific Queue. It would be for all Leads and I need to make it so the System Admin is the only one who is able to change a Lead Owner to the specific Queue. 

  3. Aug 30, 2022, 7:50 PM

    Something like this will prevent a User from transferring a Lead from a User to a Queue

    AND(

    ISCHANGED(OwnerId),

    LEFT( OwnerId, 3) = '00G',

    LEFT( PRIORVALUE( OwnerId ), 3) = '005'

    )

  4. Aug 30, 2022, 7:47 PM

    + @Prashik Ingole

     

    Queue ID starts with 00G

    AND(ISCHANGED(OwnerId),BEGINS( OwnerId, "00G")) //00G is a prefix for Queue's

  5. Aug 30, 2022, 7:42 PM

    Hi @Emily Beckman,

     

    I guess this will help, you should use this if none of the leads are never going to be assigned to Queue's.

     

    AND(ISCHANGED(OwnerId),BEGINS( OwnerId, "00F"))  //00F is a prefix for Queue's
0/9000