0

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;
}
1
  • Are you sure you're re rendering the checkbox after changing its value? Commented Jul 19, 2016 at 6:29

1 Answer 1

0

You can put a debug statement to see what the value of 'ConflictExists__c' exists is and if it is as expected. This will atleast tell you if your logic is correct.

If it is not,recheck the code If it is, see if u r rendering the checkbox properly as Amr suggested

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .