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
naveen polavarapunaveen polavarapu 

Apex trigger for round robin

Hi,

I have a trigger for Round Robin and working as expected, now there is a request to handle if Lead country is "India" then it should route to a specific Queue. This request should be addressed without code changes as it is a manged package but via Custom settings. 

I am very new to Coding. please suggest
Jack Yu@TokyoJack Yu@Tokyo
Hi 
you can use [Lead Assignment Rule] , you need not coding at all.
if country is "India" , then route to a specific [Queue India]
if country is "japan" , then route to a specific [Queue Japan]

User-added image

User-added image



I hope it will help you
naveen polavarapunaveen polavarapu
Hi Jack,

Thank you so much for your response,

Our Trigger will override Lead Assignment rules, I mean if our trigger fires then Lead Assignment rules will not fire that is the reason we are searching for other options like Custom Settings.
 
Jack Yu@TokyoJack Yu@Tokyo
Hi naveen

I got what you want to do now. Please read url below, it will help you to solve your problem.



https://salesforce.stackexchange.com/questions/185354/unable-to-disable-assignment-rules/186152
https://developer.salesforce.com/docs/atlas.en-us.212.0.apexcode.meta/apexcode/apex_class_Database_AssignmentRuleHeader.htm
<Saket><Saket>
naveen polavarapunaveen polavarapu
Thanks Jack and Saket, Your suggestions helped a lot, will confirm to you on solution once I am done with implementation.