You need to sign in to do that
Don't have an account?
Test automation logic Apex Specialist
Here's my code:
Equipment__c =cc.Equipment__c,
Origin = 'Web',
Date_Reported__c = Date.Today()
);
If (maintenanceCycles.containskey(cc.Id)){
nc.Date_Due__c = Date.today().addDays((Integer) maintenanceCycles.get(cc.Id));
}
newCases.add(nc);
}
insert newCases;
List<Equipment_Maintenance_Item__c> clonedWPs = new List<Equipment_Maintenance_Item__c>();
for (Case nc : newCases){
for (Equipment_Maintenance_Item__c wp : closedCasesM.get(nc.ParentId).Equipment_Maintenance_Items__r){
Equipment_Maintenance_Item__c wpClone = wp.clone();
wpClone.Maintenance_Request__c = nc.Id;
ClonedWPs.add(wpClone);
}
}
insert ClonedWPs;
}
}
}
MaintenanceRequest.apxt :-
trigger MaintenanceRequest on Case (before update, after update) { if(Trigger.isUpdate && Trigger.isAfter){ MaintenanceRequestHelper.updateWorkOrders(Trigger.New, Trigger.OldMap); } }
ERROR: Challenge Not yet complete... here's what's wrong:
We could not find the class 'MaintenanceRequestHelperTest' using assertions in the unit tests.
Please note that Questions about how to pass Trailhead challenges are not on topic, because these challenges are intended to be independent demonstrations of your abilities.
Trailhead Help (https://trailhead.salesforce.com/en/help?support=home)
can provide assistance for situations where Trailhead does not appear to be functioning correctly.
You can reach out to them if this is the case.Hope above information helps.
Please mark as Best Answer so that it can help others in future.
Thanks,