By rejecting non-essential cookies, Reddit may still use certain cookies to ensure the proper functionality of our platform. return wp; Vehicle__c Vehicle = new Vehicle__C(name = SuperTruck); List items = mapOldCasesWithItems.get(idOld); Skip to content. }. Case newCase = new Case(); if(MRRecord.Vehicle__c==EMIRecord.Maintenance_Request__r.Vehicle__c){ Staging Ground Beta 1 Recap, and Reviewers needed for Beta 2, What is wrong with my code on Trailhead challenge Developer Beginner > Apex Triggers > Bulk Apex Triggers, Apex Lightning upload fail because missing test class, How can I modify the meta data of any field using apex, How do i write test class for below apex code, Lightning Web Component Specialist Super badge: Challenge 7, Trailhead Superbadge Logic to create Junction Object, Apex Specialist Challenge 1 too Many DML Rows, Theoretically Correct vs Practical Notation. if(Trigger.isInsert){ pr.Name = (String)productMap.get(name); check if u have creted a process builder , i did create a proces builder and deactivated and it worked for me. for(Integer i_fail = 0; i_fail < 300; i_fail ++){ Apex Specialist Superbadge Null Reference on Challenge 4. newEMIRecord.Maintenance_Request__c=MRRecord.ID; Inserting a new Maintenance Request of type Routine Maintenance and then closing it did not create of a new Maintenance Request based upon the original record correctly. } Learn more. I ll look into it and get back to you shortly. update secondList; Work fast with our official CLI. system.assert(newReq.Subject != null); tmpCases.add(newCases.get(oldId)); workPartList.add(createWorkPart(equipmentList.get(i).id, requestList.get(i).id)); List lista = [ if(res.get(cycle)!=null){ if(!EquipmentIDListUpdate.contains(EMIRecord.Equipment__c)){ Stuck on Superbadge Apex Specialist Step 6? }, Hi, can anyone help me out with Challenge 4 in apex specialist? https://th-superbadge-apex.herokuapp.com/equipment’, Salesforce Certification Free Vouchers 2022, How to pass values and call a method from Parent-to-Child Lightning Aura Component, Automate record creation using Apex triggers, Synchronize Salesforce data with an external system using asynchronous REST callouts, Test automation logic to confirm Apex trigger side effects, Test integration logic using callout mocks, Test scheduling logic to confirm action gets queued. newEMIRecord.Equipment__c=EMIRecord.Equipment__c; I had cleared this superbadge way back in time would have to seriously redo it to understand what was done on this one. GitHub - minicruiser/Apex-Specialist-Superbadge minicruiser / Apex-Specialist-Superbadge Public Notifications 13 Star Code Issues main 1 branch 0 tags Go to file Code minicruiser Update MaintenanceRequestHelper.cls 8b195dd on Jun 6, 2022 14 commits step2 Automate record creation Update MaintenanceRequestHelper.cls 8 months ago }, if(Trigger.isAfter){ There was a problem preparing your codespace, please try again. public static String CRON_EXP = 0 0 0 15 3 ? } Make sure you create the Custom metadata records with the exact same names given (that matches the product families) In the constants apex class, declare all the properties as public static. If you are facing any hurdles to complete the challenge, just go through the code. Follow guided learning paths. list requestList = new list(); Hey pratap! for(Integer i_ok = 0; i_ok < 300; i_ok ++){ insert equipment; There was a problem preparing your codespace, please try again. Does ZnSO4 + H2 at high pressure reverses to Zn + H2SO4? Please update challenge 6 as well as all the related material. }. Equipment_Maintenance_Item__c newItem = new Equipment_Maintenance_Item__c(); I do know the core concepts but I am missing the connection. Salesforce, Trailhead, superbadge Also you could benefit more from some scenario based coding. Ask Question Asked 1 year, 3 months ago. Test.startTest(); maintenanceNew.Subject = 'Other'; Challenge 6 - WarehouseSyncScheduleTest.class. for(Case MRRecord: newList){ I worked through the Exam Prep guidelines. hi niya For Challenge 1 I am getting error for some of the fields that they doesnt exist like Vehicle__c, Equipment__c, Due_Date__c. list vehicleList = new list(); Issue with Superbadge Apex Specialist Step 5? } https://developer.salesforce.com/docs/atlas.ja-jp.apexcode.meta/apexcode/apex_scheduler.htm, ApexGUISchedulable Apex, [] [] [Apex] Apex , GUISalesforce If you don't get the complete picture of super badge, you can jot down the requirements and connect them(like a process flow diagram). newMRRecord.Subject=Routine CheckUp + date.today(); I highly doubt the entire quest would have changed. This link helped me, so I modified the code like this: Thanks for contributing an answer to Stack Overflow! Share Improve this answer Follow Salesforce[] [] [], REST API 5 Comments on Apex Superbadge (part-1) Scenario:- Automate record creation. If nothing happens, download GitHub Desktop and try again. insert newMRRecordList; The challenge is expecting to find the closed Maintenance Request plus an New Maintenance Request of type Routine Maintenance with the same Vehicle as the closed one. This repository is for solving all the problems and pass all the challenges in the way of earning this superbadge. This Superbadge challenge changed on 9th December 2020 , is above code for updated challenge? newCase.Vehicle__c=vehicle; insert product; MaintenanceRequestTest.CreateData( 5,2,2,Repair); Lets grow together. Apex specialist superbadge challenge 4. List EMIList = new List([SELECT Maintenance_Request__c,Maintenance_Request__r.Vehicle__c,Equipment__c, Equipment__r.Maintenance_Cycle__c,Quantity__c FROM Equipment_Maintenance_Item__c WHERE Maintenance_Request__r.Vehicle__c IN: newRoutineMaintenanceVehicleRecordIDList]); Work fast with our official CLI. if(MRRecord.Type==Routine Maintenance){ How Intuit democratizes AI development across teams through reusability. The author also has a YouTube channel that goes over key concepts which may be helpful: SFDC YouTube Channel Best of luck! } Request you to please update Challenge 1. result.put((Id)res.get(cID),addDays); }, //public static void updateWorkOrders() { leastValueMap.put(emi.Maintenance_Request__c,emi); newItems.add(i2); This was my last superbadge and by completing thisAdvanced Apex Specialist Superbadge, I became eligible forPlatform Developer II certificate. EmailEncodingKey=UTF-8, LastName=Testing, LanguageLocaleKey=en_US, I had mine and wrote this while doing so, Free Salesforce Exam Coupon Codes for 2022. maintenanceNew.Date_Due__c = Date.today(); caseList.add(maintenanceNew); List emiListToBeUpdated = new List(); for(case c:caseList){ Hard times, Challenge 1 : Automate record creation if(vehicleToEquipmentMap.get(MRRecord.Vehicle__c)!=null){ Salesforce sign in private static final string REQUEST_ORIGIN = Web; For that, I would suggest the following udemy course: Salesforce Development Course. ProductId=equipmentId, My Blog explains about the steps for completing this super badge. maintenanceNew.Type = 'Other'; newCase.Subject=Routine Maintenance of Vehicle; We are always on the hunt for writers that have something interesting to say! Process Automation Specialist step 7 no work. To subscribe to this RSS feed, copy and paste this URL into your RSS reader. Challenge Not yet complete heres whats wrong: Connect on telegram if you again face a similar issue, Hi jaffer. if(Trigger.isBefore){ newCases.put(oneCase.Id, newRoutineCase); maintenanceNew.ContactId = contact.Id; list equipmentList = new list(); MaintenanceRequestHelper.createNewEquipmentMaintenanceItem(Trigger.newMap); }. newCase.Date_Reported__c=Date.today(); for(Equipment_Maintenance_Item__c emi : emiList){ SYSTEM.assertEquals(newReq.ProductId, equipmentId); Please note that I also have separate method to cover positive and negative scenarios. Here I have no idea what the input is nor what the output is supposed to be. If you're if that type, you can read the apex developer documentation. }, Its not optimized but it gives me 500 points, and it is good! Trailhead solution for Apex Specialist superbadge Currently there arent any specific certification related to health cloud. Test.startTest() Test.stopTest() , , startTeststopTest, A. Super BadgeUnlockTipsTrailheadTipsUnlock }. Apex Specialist. Do I need to do some prep work. I hope you well.I know I should contact you but I just do not have anyone to turn to.Am stuck on challenge 4 for almost 3 weeks.Please help out. Apologies for the codes have changed. Trailhead Academy. List newProducts = new List(); for(Object p : externalProducts) newCase.Date_Reported__c = System.today(); Do lemme know if you find solutions codes that work well for it. Apex Code Development (89731) General Development (54672) Visualforce Development (37117) Lightning (17463) APIs and Integration (16704) Trailhead (11575) Formulas & Validation Rules Discussion (11140) Other Salesforce Applications (7994) . List EquipmentIDListUpdate = new List(); if(Trigger.isInsert){ insert newEMIRecordList; }, @isTest static void test_triggerMaintenanceRequestHelperTest() {. List newMRRecordList = new List(); system.assert(allRequest.size() == 1); insert emptyReq; Equipment_Maintenance_Item__c workP = createWorkPart(equipmentId, emptyReq.Id); Would have to get back to you. Map result = new Map(); insert acc; Contact contact = new Contact(); Start a discussion in the forum to get straight-up answers. leastValueMap.put(emi.Maintenance_Request__c,emi); newCases.add(newCase); EquipmentIDListUpdate.add(EMIRecord.Equipment__c); If multiple equipments are used in the maintenance request, choose the shortest maintenance cycle to define the service date. Lightning Experience Specialist https://developer.salesforce.com/docs/atlas.ja-jp.salesforce_app_limits_cheatsheet.meta/salesforce_app_limits_cheatsheet/salesforce_app_limits_platform_apexgov.htm, 3-8SOQLforTrigger.new100Trigger.new200(200200), for200 Alternatively you can join our telegram group for technical discussions among industry professionals. Step 1 Go through the Apex Specialist Use-Case,Business Requirement And Schema Diagram of the Story, Step 2 -Create a New Trail Head Playground so That there will not be any Problem while Going through the apex code, Step 3 -To Start the apex challenge Install this unmanaged package after that go through the Standard object and the custom object details in your org so that you might get understand the basic of the Requirement, Step 4 you all have the apex class made while installing unmanaged package, a. Update the following below code in the MaintenanceRequest trigger, trigger MaintenanceRequest on Case (before update, after update) {, // call MaintenanceRequestHelper.updateWorkOrders. Id oldCaseId = item.Maintenance_Request__c; All rights reserved, Salesforce Advanced Apex Specialist Trailhead Superbadge, .. mark it public and tick the disable auto archive checkbox and use the description text given, TechForce Services Makes a Big Impact with its Cutting-Edge Solutions, Make sure you create the Custom metadata records with the exact same names given (that matches the product families), In the constants apex class, declare all the, OrderTrigger should use the Orderhelper internally for the rollup, in the pageblock table columns, use the field labels as headers using$ObjectType, update the column values to use the productRecord fields inside the productwrapper, use apex:chart to display the horizantal bar chart in a separate pageblock above the table, reRender the required components from the Save and Add buttons, Make the Controller class Without Sharing, replace the list of products with list of productwrapper, iterate thru the productWrapper and extract the products and pricebookentries and insert them separately, use try catch block and do a rollback if there are any errors, move the chart data initialisation logic to Chart Helper class, Make sure all the methods in the TestDataFactory class are, all the construct methods should create the mentioned objects with the required fields and unique names and return the records without inserting them. pr.Cost__c = (Integer)productMap.get(cost); from Equipment_Maintenance_Item__c What is a word for the arcane equivalent of a monastery? Please insert newCases; newItems = new List(); Eigenmann & Veronelli un Gruppo internazionale che nasce nel 1910 leader nella distribuzione di specialit chimiche e ingredienti alimentari per l'industria.. Con circa 340 dipendenti e . @future Also search for blogs, articles regarding it. For getting more knowledge I'll suggest go to Apex Hours YouTube channel and check-out the developer series. else{ if(!leastValueMap.containsKey(emi.Maintenance_Request__c)){ for(Id idOld : idOldCases){ Let the universe renounce some goodness to you . 2023 TechForce Services. How to react to a students panic attack in an oral exam? private static void testMaintenanceRequestPositive(){. Help with Superbadge Apex Specialist Step 3? newCase.Equipment__c = leastValueMap.get(c.Id).Equipment__c; }, Case newRoutineCase = createNewMaintenanceCase(oneCase.Id, oneCase.Vehicle__c, newDate); if(maintenanceCycle==0){ public static void setupTest(){ If you have just one and a half months experience in Salesforce, apex specialist is a little too early now. Discover your ideal career. Equipment_Maintenance_Item__c i2 = buildItem(newCases[i_fail].Id, equipment.Id); Yeah, well make that someone yourself and do whatever the hell you want.. Try logging in and out and reverify. Accelerate learning across your organization. }. I just started Salesforce one and a half months ago. As it's currently written, it's hard to understand your solution. } Start a discussion in the forum to get straight-up answers. newEMIRecord.Quantity__c=EMIRecord.Quantity__c; We have a small group to help out each others. This repository is for solving all the problems in the way of earning this superbadge. equipmentList.add(createEq()); sign in List createdCases = [Select Id from Case where Type = Routine Maintenance]; Hi Shaid, Please use below code:-. public static void testNegative(){ By clicking Accept all cookies, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our Cookie Policy. Challenge 2: Synchronize Salesforce data with an external system. FROM Equipment_Maintenance_Item__c where Maintenance_Request__r.ID in :caseKeys.keySet() Vehicle__c newVehicle = new Vehicle__c(); from Equipment_Maintenance_Item__c When this Superbadge came up, I identified several resources online that helped walk me through it. I am working on "Advanced Apex Specialist" Superbadge but I am not able to pass challenge 1 as it keeps on showing me that Select one label is not created. System.debug(*** Updated cases: +caseToUpdate.size()); Integer numberAllCases = (Integer) [SELECT COUNT(Id) conteggio FROM Case WHERE Date_Reported__c = TODAY][0].get(conteggio); Thats a technical error. Vehicle__C vehicle = createVehicle(); System.assertEquals(1000,caseList.size()); for(Case cas:caseList){ List newCaseList = new List(); trigger MaintenanceRequest on Case (before update, after update, before insert, after insert) { maintenanceNew.Vehicle__c = vehicle.Id; contact.AccountId = acc.Id; Refer to the Apex Specialist Superbadge: Trailhead Challenge Help document for detailed resources and documentation. Http http = new Http(); Please Check this answer if this helps. Step 1. Closing a Maintenance Request of type 'Routine Maintenance' or 'Repair' did not create of a new Maintenance Request with the correct due date. maintenanceNew.ProductId = product.Id; insert vehicle; newEMIRecordList.add(newEMIRecord); } if(response.getStatusCode() == 200) Map vehicleToEquipmentMap = new Map(); Trails. . I started working on this superbadge and this post is to document some of the findings / tips / gotchas as I progress through this one. addDays+=daysToAdd; SYSTEM.assertEquals(newReq.Vehicle__c, vehicleId); caseToUpdate.add(newCase); Please help! System.assert(numberAllCases==900); I am getting invalid type schema: for work_part__c, can you help me how to resolve this on, it doesnt seems typo error, but i cant find any field of such type also. Hey itachi, try debugging the code and look where the issue is. If you like what I write and it has been ever helpful to you. Please Guide me.. Various trademarks held by their respective owners. private static final string CLOSED = Closed; system.debug(newEMIRecordList.size() +newEMIRecordList.size()); This query will return all completed batch, future, and queryable jobs that were completed today. vehicleList.add(createVehicle()); I think everyone has given awesome suggestions , I'll try to add some more insights -. Now Update the below code in HelperClass MaintenanceRequestHelper, public static void updateWorkOrders(){// update workorders//bulk determineList maintenanceRequestList=[select id,case.Vehicle__c,Equipment__c,Equipment__r.Maintenance_Cycle__c,Type,Status from case where id in :Trigger.New limit 200];if(maintenanceRequestList !=null && maintenanceRequestList.size()>0 ){List insertMaintenanceRequest=getCaseList(maintenanceRequestList);insert insertMaintenanceRequest;}}, public static List getCaseList(List maintenanceRequestList){List newMaintenanceRequestList= new List();for(Case cas:maintenanceRequestList){if(cas.Type==Routine Maintenance && cas.Status==Closed){case newMaintenanceRequest=new Case();newMaintenanceRequest.Subject=test;newMaintenanceRequest.Type=Routine Maintenance;newMaintenanceRequest.Vehicle__c=cas.Vehicle__c;newMaintenanceRequest.Equipment__c=cas.Equipment__c;newMaintenanceRequest.Date_Reported__c=date.Today();newMaintenanceRequest.Date_Due__c=Date.today().addDays(Integer.valueOf(cas.Equipment__r.Maintenance_Cycle__c));newMaintenanceRequest.Status=New;newMaintenanceRequest.Origin=Phone;newMaintenanceRequestList.add(newMaintenanceRequest);}}return newMaintenanceRequestList;}}, 2: Synchronize Salesforce data with an external system, public with sharing class WarehouseCalloutService {. Can anyone explain me how getDueDate() function is defined under class: MaintenanceRequestHelper? Test.stopTest(); Viewed 5k times . Home. rev2023.3.3.43278. Trailhead maintenance_cycle__C = 10, Recovering from a blunder I made while emailing a professor. Apex specialist superbadge challenge 4. private static final string REQUEST_TYPE = Routine Maintenance; newCaseList.add(newCase); The challenge is expecting the due date to be calculated using the maintenance cycle defined on the related equipment records. pr.ProductCode = (String)productMap.get(_id); APEX. mapCases.put(oldCaseId,new List()); Can you please help me out, I am also getting the same error. Any help appreciated! Install the unmanaged package for the schema and stubs for Apex classes and triggers. 2UnixCron, Apex e.Maintenance_Request__c = oldNewCaseMap.get(emis.Maintenance_Request__c).Id; Its been long time I completed those quests. Equipment_Maintenance_Item__c i1 = buildItem(newCases[i_ok].Id, equipment.Id); My Blog explains about the steps for completing this super badge. Integer daysToAdd = Integer.valueOf(res.get(cycle)); Apex Specialist Superbadge Trailmix | Salesforce Trailhead Laura Thomas +19,700 Points +1,000 points Module Apex Triggers Write Apex triggers to perform custom database actions. newEMIRecord.Quantity__c=EMIRecord.Quantity__c; List newEMIRecordList = new List(); One question, how does the map newCases get updated with the new Case IDs following the insert tmpCases? } newCase.Origin = 'Phone'; oldRequestIds.add(req.Id); System.debug(*** Updated cases: +caseToUpdate.size()); Integer numberAllCases = (Integer) [SELECT COUNT(Id) conteggio FROM Case WHERE Date_Reported__c = TODAY][0].get(conteggio); Stuck on Superbadge Apex Specialist Step 1? 3 Answers. Case newCase = new Case(); newCase.Comments = New comment!; return Vehicle; insert requestList; for(integer i = 0; i < 300; i++){ @future(callout=true)public static void runWarehouseEquipmentSync(){, if(response.getStatusCode()==200){//System.debug(size of equipment +equipmentlist.size());List updateEquipmentlist=getProductlist(response);if(updateEquipmentlist.size() > 0){insert new List(updateEquipmentlist);}}}, public static List getProductlist(HttpResponse response){, List externalEquipment = (List) JSON.deserializeUntyped(response.getBody());List equipmentlist=new List();//System.debug(size of result+externalEquipment.size());for (Object externalEquipment1: externalEquipment) {Map data = (Map)externalEquipment1;//system.debug(externalEquipment1);//system.debug(data+===+data.get(cost));Product2 equipment=new Product2();//equipment.Id =(String)data.get(_id);equipment.Cost__c=(Integer)data.get(cost);equipment.Lifespan_Months__c =(Integer)data.get(lifespan);equipment.Maintenance_Cycle__c =(Integer)data.get(maintenanceperiod);equipment.Name =(String)data.get(name);equipment.Current_Inventory__c =(Integer)data.get(quantity);equipment.Replacement_Part__c =(Boolean)data.get(replacement);equipment.Warehouse_SKU__c=(String)data.get(sku);equipmentlist.add(equipment);}return equipmentlist;}, public static HttpResponse getrespond(){Http http=new Http();HttpRequest request=new HttpRequest();request.setEndpoint(WAREHOUSE_URL);request.setMethod(GET);HttpResponse res=Http.send(request);return res;}}, global class WarehouseSyncSchedule implements Schedulable{// implement scheduled code hereglobal void execute (SchedulableContext sc){, WarehouseCalloutService.runWarehouseEquipmentSync();//optional this can be done by debug modeString sch = 00 00 01 * * ?;//on 1 pmSystem.schedule(WarehouseSyncScheduleTest, sch, new WarehouseSyncSchedule());}}, @isTestpublic class MaintenanceRequestTest {, @isTest static void testMaintenanceRequest(){, List maintenanceList=new List();List maintenanceListAfterClosed=new List();Vehicle__c vehicle=new Vehicle__c(Name=tata sumo,Air_Conditioner__c=true,Model__c=23Test);insert vehicle;Product2 equipment=new Product2(Name=tire,Cost__c=100,Current_Inventory__c =10,Replacement_Part__c=true,Warehouse_SKU__c =test,Lifespan_Months__c =10,Maintenance_Cycle__c=10);insert equipment;for(Integer i=1;i<=300;i++){Case maintenance=new Case(Subject=Test subject+i,Type=Routine Maintenance+i,Status=New+i,Origin=Phone+i,Equipment__c=equipment.Id,Vehicle__c=vehicle.Id);maintenanceList.add(maintenance);}insert maintenanceList;// system.assertEquals(300, maintenanceList.size());for(Case caseupdate:maintenanceList){caseupdate.Status=Closed;caseupdate.Type=Routine Maintenance;caseupdate.Date_Due__c=date.Today().addDays(Integer.valueOf(equipment.Maintenance_Cycle__c));maintenanceListAfterClosed.add(caseupdate);}Test.startTest();//UPDATE maintenanceListAfterClosed;//Bulk insert updateDatabase.SaveResult[] updatequipment = Database.update(maintenanceListAfterClosed);Test.stopTest();for(Database.SaveResult sa:updatequipment){System.assert(sa.isSuccess());}}}, @isTestglobal class WarehouseCalloutServiceMock implements HttpCalloutMock {// implement http mock callout//Mock responce created to test the call outglobal HttpResponse respond(HttpRequest request){System.assertEquals(https://th-superbadge-apex.herokuapp.com/equipment', request.getEndpoint());System.assertEquals(GET, request.getMethod());HttpResponse response = new HttpResponse();response.setHeader(Content-Type, application/json);response.setBody([{_id:55d66226726b611100aaf741,replacement:false,quantity:5,name:Generator 1000 kW,maintenanceperiod:365,lifespan:120,cost:5000,sku:100003}]);response.setStatusCode(200);return response;}}, @isTestprivate class WarehouseCalloutServiceTest {// implement your mock callout test here@isTest static void TestWarehouseCalloutService() {Test.startTest();//mock respoonseTest.setMock(HttpCalloutMock.class, new WarehouseCalloutServiceMock());WarehouseCalloutService.runWarehouseEquipmentSync();Test.stopTest();}}, @isTest static void WarehousescheduleTest(){. vehicleToEquipmentMap.put(MRRecord.Vehicle__c,EquipmentIDListUpdate); } newMRRecord.Date_Due__c=date.today(); This is probably the simplest of all the steps.. update theTestDataFactory class to handle the key requirements given.. { Find centralized, trusted content and collaborate around the technologies you use most. I will look into it surely Thanks, Please leave a comment once you update the code, Could u specifically mention if one challenge has changed or entire superbadge set, Check the code mentioned by Laendor n lemme know if it works. The region and polygon don't match. product2 equipment = new product2(name = SuperEquipment, Set oldIdCases = newCases.keySet(); You should definitely complete the task on your own and you can get all the help. Thanks again for pointing it out. Hi, Its giving error for me . The nature of simulating nature: A Q&A with IBM Quantum researcher Dr. Jamie We've added a "Necessary cookies only" option to the cookie consent popup. product.Replacement_Part__c = true; insert workP; test.startTest(); Honestly, I suggest reviewing the trailheads leading up to the apex super badge since the apex specialist Superbadge tests you on those core concepts. ApexSchedulable , execute, Change the labels for Case and Product To Maintenance Request and Equipment respectively. Are you sure you want to create this branch? CronTrigger a=[SELECT Id FROM CronTrigger where NextFireTime > today]; System.assertEquals(jobID, a.Id,Schedule ); Originally published at https://shivshankarsfdc.com on July 29, 2019. Test scheduling logic to confirm action gets queued. I have a background in programming but I just can't understand most of the challenge. case cs = new case(Type=REPAIR, Hi, contact.FirstName = test; test.stopTest(); list allRequests = [select id You have to rename the two standard fields as indicated and then the mentioned changes in apex and trigger codes. Vehicle__c vehicle = createVehicle(); Use above code for step 5 and then use system assert with constant 0 and returned value will be 0. } Hot Network Questions Applications of super-mathematics to non-super mathematics Resistance against timing attacks of AES candidates How to deal with Hostile Work Environment after attending Employee Workshop The region and polygon don't match. HttpResponse response = http.send(request); Apex Specialist Superbadge Use integration and business logic to push your Apex coding skills to the limit. insert equipment; newMRRecord.Vehicle__c = MRRecord.Vehicle__c; We could not find the class MaintenanceRequestHelperTest using assertions in the unit tests. Reddit and its partners use cookies and similar technologies to provide you with a better experience. if(MRRecord.Type==Routine Maintenance){ e.Equipment__c = emis.Equipment__c; How can I find out which sectors are used by files on NTFS? List caseToUpdate = new List(); } This is the message I get: I was able to solve it, when trailhead runs the testing is doing a count query to Cases based on the Subject, I didn't put the subject when the case is created as new. } private static final string STATUS_NEW = New; system.assertEquals(newReq.Type, REQUEST_TYPE); } } } Trailblazer CommunityTrailhead, ApexSalesforce Developer, Trailhead vol2. } private static Map createNewCases(List caseList) { insert contact; Vehicle__c vehicle = new Vehicle__c(); Test.stopTest(); for(Case MRRecord: newMap.values()){ for(Equipment_Maintenance_Item__c EMIRecord: EMIList){ update caseToUpdate; System.assert(numberAllCases==600); Apex SpecialistApexMockApex Tips3 Playground Trailhead - Reports & Dashboards Specialist . insert tmpCases; public static Map getDueDate(List CaseIDs) { }, @isTest newRoutineMaintenanceVehicleRecordIDList.add(MRRecord.Vehicle__c);