3 answers
Hi,You can put the condition of RecordType.name = '"Name of record Type",.If you have created record type on Lead then you can query the only that record type on which you want to update.Like this : SELECT Id, Status FROM Lead WHERE Id IN :leadIds AND IsConverted=FALSE and ( RecordType.name = 'REcord type name 1' or RecordType.name = 'REcord type name 2')Or if you have create record type on Task than collect leadIds only that tasks which having that record type. if(t.Subject.contains(task_subject_check) and ( t.RecordTypeId = '1 RT' or t.RecordTypeId = '2 RT' ) ){ leadIds.add(t.whoId);} }//if 2-thanksAshlekh Gera