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
udayarangareddy mekalaudayarangareddy mekala 

Trigger Test Class121212

HI
  How to cover the IF condition and FOR loop in the TRIGGER TEST Class.I posted below code.

if(Trigger.isInsert){
        for(Account t: Trigger.new){
         Account_History__c acc1 = new Account_History__c();
               acc1.field__c='Creat';
               acc1.accId__c=t.id;

                  acc.add(tacc1);
                  Thanks&Regards
RangaReddy
Andy BoettcherAndy Boettcher
RangaReddy,

Please review the documentation link that was provided on your last post - the forums are not a resource to write code for you if you are unwilling to learn.