Hi friends we have preventing users to create new leads with same email id.But trigger is needs to fire only when record creation.

Everything is working fine.But when i try to upload leads through data loader Some leads are getting error like already lead with same email id is existing in organisation.

When i check there are no leads avilable in organisation with same mail id.If then i try to create a lead manually i can able to create.

I didn't find why is happening like this

My apex class

```
public class LeadDuplication {
    public static void LeadVerification(List<Lead> LeadTriggers)
    {
        Id recordTypeId = [Select Id From RecordType Where DeveloperName = 'Leads'].Id;
        List<Lead> LeadIDs = new List<Lead>();
        List<String> LeadEmails = new List<String>();
        List<Lead> Emailverification = new List<Lead>(); 
        for (Lead l : LeadTriggers)
        {
            if(l.RecordTypeId == recordTypeId && l.Email <> null ) 
            {
                    // Loop through and add caseId's to the list.
                     LeadIDs.add(l);
                     LeadEmails.add(l.Email);
            }
        }
        Emailverification =[Select Id,Email,RecordTypeId from Lead where 
                            RecordTypeId=:recordTypeId AND Isconverted = false AND Isdeleted= false 
                            AND Email=:LeadEmails];
        For(Lead ls:LeadTriggers){
        if(Emailverification.size()>0) 
        {
           ls.addError('An open/active lead with the same information exists');
        }  
      }
    }
}

```

Trigger Code:

```
if(Trigger.isBefore && trigger.isInsert || Trigger.isBefore && trigger.isUpdate ) {

        //It will call a static method called FssteamMapping in FssTeamUpdate.
        FssTeamUpdate.FssteamMapping(Trigger.New);
        LgsTeamLead.LgsTeamLeadMapping(Trigger.New);
        Qualifier.QualificationScore(Trigger.New);

    }

```