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
Domnic JohnsonDomnic Johnson 

Limit users to accept Old leads first from queue

We don't want our sales user cherry picking leads from the queue so we would want them to restrict the users to just be able to pick leads which are the oldest only.

Can someone help me with a trigger or validation rule which will limit

Please suggest how I can limit the sales users to only accept the oldest leads from the queue.

Thanks, 
Domnic
Raj VakatiRaj Vakati
You can do it by using batch apex 
 
https://developer.secure.force.com/cookbook/recipe/using-batch-apex-to-reassign-account-owners

 
NagendraNagendra (Salesforce Developers) 
Hi Dominic,

The purpose of a queue is to allow multiple users to access leads. If you are looking to not allow "cherry picking" I would recommend using the Round Robin method. Here are some sources to get you started. These will essentially assign the leads a # as they come in, then assign to different reps based on the assigned number. This allows you to assign regardless of standardized criteria like location, size, type, etc., and truly just randomize it.
  • http://wiki.developerforce.com/index.php/Round_Robin_Lead_Assignment_Trigger
  • http://sites.force.com/appexchange/apex/listingDetail?listingId=a0N3000000178fsEAA
Hope this helps.

Kindly mark this as solved if the reply was helpful so that it gets removed from the unanswered queue which results in helping others who are facing a similar issue.

Thanks,
Nagendra
Domnic JohnsonDomnic Johnson
Hi Raj,

Am not a developer so am not sure how I could use it the link. Could you guide me please