I am writing a piece of code in a trigger which gives correct results. it is not working quite well. It is working for either one scenario.
if ( (CV1 == Ol)) {
System.debug('Enter 1 :');
if ((po.Type__c == o.Product_Interest__c)) {
System.debug('Enter 2 :');
if ((po.Agent_City__c == o.Contact_City__c)) {
System.debug('Enter 3 :');
if ((m.name == po.Covered_Person1_First_Name__c)) {
System.debug('Enter 4 :'); //either this
if (m.name == o.Opp_First_Name__c) { // or this one is working not both
System.debug('Enter 5 :');
o.Policy__c = po.id;
}
}
}
}
}
Here either 'Enter 4' statement is working or 'enter 5' if condition statement is working. When i alternatively removed and tested. But not working with both.