You need to sign in to do that
Don't have an account?

how to code coverage the trigger ?
hi,
i am faceing a probject for coverage a unit test code please help me ?
trigger on inforamtionManagement on informationManagement__c(After insert) {
for(informationManagement__c infoobj:trigger.new){
if(infoobj.canclae_Event__c== False && infoobj.Target_People__c=='Person'){
Resitration_from__c rsfobj=new Resitration_from__c();
rsfobj.Record_type='new';
rsfobj.Account_Name=infoobj.lead_Name__c;
rsfobj.start_date__c=infoobj.start_date__c;
isnert(rsfobj);
}
}
}
i am faceing a probject for coverage a unit test code please help me ?
trigger on inforamtionManagement on informationManagement__c(After insert) {
for(informationManagement__c infoobj:trigger.new){
if(infoobj.canclae_Event__c== False && infoobj.Target_People__c=='Person'){
Resitration_from__c rsfobj=new Resitration_from__c();
rsfobj.Record_type='new';
rsfobj.Account_Name=infoobj.lead_Name__c;
rsfobj.start_date__c=infoobj.start_date__c;
isnert(rsfobj);
}
}
}
i would suggest you refer below trailhead module to know more about test class for trigger that can help you.
https://trailhead.salesforce.com/en/content/learn/modules/apex_testing/apex_testing_triggers
Best Regards,
Sandhya
And tell us all the object hierarchy (Parent, Child) and fields.
https://www.sfdc4students.com/2018/02/apex-trigger-with-helper-class-and-test.html