function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
jhansisridhar_2011jhansisridhar_2011 

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.

bob_buzzardbob_buzzard

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