I have a check box which gets checked based on the following condition. Here i am checking case sensitivity for each field if there exists case insensitivity the checkbox will become true(Conflict Exists__c),
For Eg : LastName : Sathish (in account) LastName : sathish (in lead) . It should be true, but its not happening.
if(!(oLea.Account__r.FirstName.equalsIgnoreCase(oLea.FirstName)) ||
!(oLea.Account__r.LastName.equalsIgnoreCase(oLea.LastName))||
!(oLea.Account__r.PersEmailAddress__c.equalsIgnoreCase(oLea.Email))||
!(oLea.Account__r.PersMobPhone__c.equalsIgnoreCase(oLea.MobilePhone)) ||
!(oLea.Account__r.HomePhone__c.equalsIgnoreCase(oLea.HomePhone__c) ) ||
!(oLea.Account__r.BillingCity.equalsIgnoreCase(oLea.City)) ||
!(oLea.Account__r.BillingStreet.equalsIgnoreCase(oLea.Street)) ||
!(oLea.Account__r.BillingPostalCode.equalsIgnoreCase(oLea.PostalCode))){
System.debug('Fname===>' + (oLea.Account__r.FirstName.equalsIgnoreCase( oLea.FirstName )));
System.debug('Fname===>' + oLea.Account__r.FirstName);
System.debug('Lname===>' + oLea.FirstName);
System.debug('truetest');
oLea.ConflictExists__c=True;
}
else{
System.debug('elsetest');
oLea.ConflictExists__c=False;
}