public class checkRecursive {
private static boolean run = true;
public static boolean runOnce()
{
if(run)
{
run=false;
return true;
}
else
{
return run;
}
}
}
trigger duplicateLead on Lead (after insert) {
if(checkRecursive.runOnce()){
List<Lead> leadList = new List<Lead>();
leadList = Trigger.new.deepClone();
insert leadList;
}
}