Skip to content

Instantly share code, notes, and snippets.

View BrightCloudNH's full-sized avatar

BrightCloudNH

View GitHub Profile
// leadsRoundRobin.trigger:
trigger leadRoundRobin on Lead (before insert, before update) {
//
//Check if assignment owner has changed
//
Map<Integer,Id> queueIds = new Map<Integer,Id>(); //Trigger index --> Queue ID
Integer idx = 0;
for (Lead l : Trigger.new)