1 réponse
Hi Parise,
You have 2 SOQL query with no limit and if the query do not find any object to the related query it will failed. Also if the query return more than one object it will throw list has more than 1 row for assignment to SObject.
Lead updateLead2 = [Select id, email from Lead where id =: testLead3.Id];
User partnerUser = [Select id from User where email = 'puser000@testlead.com'];
I suggest that change the query to:List<Lead> updateLead2 = = [Select id, email from Lead where id =: testLead3.Id];And if the updateLead2 <> null loop trough the records to modidy what you want/