+ Start a Discussion

URGENT : Regarding If Condition in test class for trigger.

Hi All,


It's Very urgent !!

Can anyone help to write a test class for below code.


Need to satisfy if condition.I created 2 records of an object with Akreos_MIL__c = 220 and Akreos_MIL__c = 210. but, it;s not working increase code coverage.


if (trigger.OldMap.get(pv.Id).Akreos_MIL__c != pv.Akreos_MIL__c) {







Thanks in Advance.


Rather than creating two records, it looks like you should be updating one of them to change the value of Akreos_MIL__c