You need to sign in to do that
Don't have an account?
Problem with Merge Statement !!
Hi,
I am trying to merge two lead records ,please find below the code.
Lead leads= [SELECT Email,company, RFI_Record_Type__c FROM Lead
WHERE email IN:emailSet and Email !=null and Id not IN:leadIds Order By CreatedDate DESC Limit 1];
List<Lead> newLeads=[SELECT Email,company, RFI_Record_Type__c FROM Lead
WHERE Id IN:leadIds and Email !=null];
merge leads newleads;
Leads is the master record and newLeads is the duplicate/new records. Both the soql queries return a row , which is good. When I debug , it shows both are merged and the merged record deleted which is good.
But When I again try to assert for the merged value by using a soql over leads as same as the first soql above, it returns the same old record but does not display any merged value.
Any help would be nice to have .
Thank You