} replacement_part__c = true); $ sfdx force:source:retrieve -n NameOfThePackage This will retrieve all the components in the package into a new folder named as the package. Also some of the functions come predefined and it might be that as well. Closing a Maintenance Request of type Routine Maintenance did not create of a new . update caseToUpdate; Learn more. Test callout logic Challenge 6 - WarehouseSyncScheduleTest.class. REST APICall https://techevangel.com/2018/06/01/superbadge-advanced-apex-specialist/. hi, martand please lemme know if it is verified, I ll update the same! List wpc= [ }, @isTest static void test_triggerMaintenanceRequestHelperTest() {. Test automation logic || Apex Specialist Superbadge Education Org's 273 subscribers Subscribe 23 Share 6.4K views 6 months ago Apex Specialist - Superbadge This is Apex Specialist Superbadge. Product2 pr = new Product2(); ), Press J to jump to the feed. Test.startTest(); Please note that I also have separate method to cover positive and negative scenarios. newMRRecord.Subject=Routine CheckUp + date.today(); https://salesforce.stackexchange.com/questions/336871/apex-specialist-challenge-1-productid-null/341363#341363. Hey nelson..Save that test class first and then use the same, for Challenge #2 please run System.enqueueJob(new WarehouseCalloutService()); in Anonymous window, this will work for sure, Can someone please share the working code for 4th (this) challenge. vehicleList.add(createVehicle()); Hi @Edgar Moran, Can you please send me complete code of this "Unlock the Apex Specialist Superbadge". admin } public with sharing class WarehouseCalloutService implements queueable, Database.AllowsCallouts {. else if(leastValueMap.containsKey(emi.Maintenance_Request__c) && emi.Equipment__r.Maintenance_Cycle__c < leastValueMap.get(emi.Maintenance_Request__c).Equipment__r.Maintenance_Cycle__c){ What am I doing wrong here in the PlotLegends specification? Work fast with our official CLI. Press question mark to learn the rest of the keyboard shortcuts. Currently there arent any specific certification related to health cloud. 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. Please update challenge 6 as well as all the related material. ApexSOQL100, Apex Hi Admin, Advanced-Apex-Specialist-Salesforce-Super-Badge. document.getElementById( "ak_js_1" ).setAttribute( "value", ( new Date() ).getTime() ); Ever loved someone so much, you would do anything for them? insert equipment; MaintenanceRequestHelper.createNewEquipmentMaintenanceItem(Trigger.newMap); Maintenance Request to the same vehicle . insert vehicle; Set oldIdCases = newCases.keySet(); But I have created it as you can see in below image. } System.debug(*** Total cases (expected 900): +numberAllCases); newItems.add(i1); MaintenanceRequestTest.CreateData( 5,2,2,Repair); public with sharing class WarehouseCalloutService implements queueable, Database.AllowsCallouts { 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 The author also has a YouTube channel that goes over key concepts which may be helpful: SFDC YouTube Channel Best of luck! Vehicle__c vehicle = buildVehicle(); Test.startTest(); insert equipment; List newCases = new List(); newCase.Comments = New comment!; , Greeting Laendor, 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. newCase.Subject=subjectCase; else if(maintenanceCycle > EMIRecord.Equipment__r.Maintenance_Cycle__c){ Could you please point out the specifics. insert workP; test.startTest(); }. Issue with Superbadge Apex Specialist Step 5? // Sync with Warehouse Skip to content. system.assertEquals(newReq.Type, REQUEST_TYPE); return cs; This is probably the simplest of all the steps.. update theTestDataFactory class to handle the key requirements given.. Site design / logo 2023 Stack Exchange Inc; user contributions licensed under CC BY-SA. leastValueMap.put(emi.Maintenance_Request__c,emi); Accelerate learning across your organization. List EquipmentIDListUpdate = vehicleToEquipmentMap.get(MRRecord.Vehicle__c); With that being said, it seems like you need more understanding of the apex coding language in general. ~1 hr 30 mins +1,500 points Module Apex Testing Write robust code by executing Apex unit tests. (I have already renamed Case and Product objects) workPartList.add(createWorkPart(equipmentList.get(i).id, requestList.get(i).id)); private static final String WAREHOUSE_URL = https://th-superbadge-apex.herokuapp.com/equipment; public void execute(QueueableContext context){ Apologies for m caught quite off guard at this moment. I can fairly understand parts of it but never get the compete picture. Apex Specialist Tips, Copyright 2000-2017 salesforce.com, inc.All rights reserved., Trailhead Reports & Dashboards Specialist, https://developer.salesforce.com/docs/atlas.ja-jp.salesforce_app_limits_cheatsheet.meta/salesforce_app_limits_cheatsheet/salesforce_app_limits_platform_apexgov.htm, https://developer.salesforce.com/docs/atlas.ja-jp.apexcode.meta/apexcode/apex_scheduler.htm. Please Guide me.. This Superbadge challenge changed on 9th December 2020 , is above code for updated challenge? 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). 6. } @istest List newMRRecordList = new List(); List externalProducts = (List) JSON.deserializeUntyped(response.getBody()); I would recommend you to follow the blog rather than looking into the code. System.assert(numberAllCases==600); Maintenance_Request__c = requestId); Need help on specific errors? Case newCase = mapOldCasesWithNewCases.get(idOld); if(newProducts.size() >0) Hi the challenge has been updated. Hey sanskar! MaintenanceRequestHelper.updateWorkOrders(); b. Apex } System.schedule , JobIdJobIDCronTriggerJob }, public static void updateNewMaintenanceRequest(List newList){ Stuck on Superbadge Apex Specialist Step 6? It is nothing but the name of the class created earlier. newCase.Status=closed; newMRRecord.Date_Due__c=date.today(); Lightning Experience Specialist Please help! ProductId=equipmentId, private static final String WAREHOUSE_URL = https://th-superbadge-apex.herokuapp.com/equipment'; // complete this method to make the callout (using @future) to the// REST endpoint and update equipment on hand. else{ The followings are the challenges to earn this badge: Automate record creation using Apex triggers. newEquipment.Lifespan_Months__c = 10; I would recommend you to follow the blog rather than looking into the code. emptyReq.Status = WORKING; Also you could benefit more from some scenario based coding. A tag already exists with the provided branch name. insert workP; test.startTest(); Search for an answer or ask a question of the zone or Customer Support. Replace male USB-C plug in lenovo charger cable Is it possible to talk with "a staff"? Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Please edit your answer to include an explanation of your code. I find it really difficult to do anything on my own. Save my name, email, and website in this browser for the next time I comment. emiListToBeUpdated.add(e); Salesforce Trailhead Superbadge: Apex Specialist Solution Challenge 1: Automate record creation STEP 1: Create a new Trailhead Playground Install the unmanaged Package Rename Case to Maintenance Request and Product to Equipment STEP 2: Automate record creation using Apex Trigger Update the trigger MaintenanceRequest: } newCase.Type=typeCase; }. A tag already exists with the provided branch name. newDate = Date.today()+result.get(oneCase.Id); Contact contact = [SELECT Id, FirstName, LastName,Email,AccountId FROM Contact WHERE Email = test@test.com LIMIT 1]; EquipmentIDListUpdate.add(EMIRecord.Equipment__c); Map mapOldCasesWithNewCases = createNewCases(caseList); linkEquipmentsToNewCases(mapOldCasesWithItems,mapOldCasesWithNewCases); Here I have no idea what the input is nor what the output is supposed to be. where status = :STATUS_NEW]; Equipment_Maintenance_Item__c workPart = [select id maintenanceNew.Status = 'New'; Case newCase = new Case(); caseToUpdate.add(newCase); if(Trigger.isInsert){ pr.ProductCode = (String)productMap.get(_id); To learn more, see our tips on writing great answers. Are you sure you want to create this branch? Case newCase = new Case(); for(Case caseInList: caseList){ List listEquipmentMaintenanceItem = Synchronize Salesforce data with an external system using asynchronous REST callouts. im stuck in challenge 4. newEMIRecord.Quantity__c=EMIRecord.Quantity__c; Closing a Maintenance Request of type 'Routine Maintenance' or 'Repair' did not create of a new Maintenance Request with the correct due date. Test.startTest() Test.stopTest() , , startTeststopTest, A. Super BadgeUnlockTipsTrailheadTipsUnlock Status=STATUS_NEW, Career Paths. SELECT Id, Maintenance_Request__c, Equipment__c , Quantity__c User u = new User(Alias = stdtest, Email=stdtest@testorg.com, check the solution martland has linked, lemme know if it is working fin A limit involving the quotient of two sums, Doubling the cube, field extensions and minimal polynoms, Calculating probabilities from d6 dice pool (Degenesis rules for botches and triggers), Euler: A baby on his lap, a cat on his back thats how he wrote his immortal works (origin?). I want to know that which part of my code is wrong, not just answer. Retry the process aforementioned. And execute in the anonymous window below: Read More: Salesforce Interview Questions and Answers We Swear By! }. WHERE Maintenance_Request__c IN :setIdCases]; Map mapCases = new Map(); Date todayDate = System.today(); maintenanceNew.ContactId = contact.Id; List emiListToBeUpdated = new List(); for(case c:caseList){ } 2UnixCron, Apex Challenge 1 - MaintenanceRequest.trigger and MaintenanceRequestHelper.class newEMIRecord.Equipment__c=EMIRecord.Equipment__c; newCase.Comments = New comment!; centerfold boy girl gallerycara membaca heatmapjava print libraryNot when Mom says I have to go inside Keep on trying, and you can finish this badge! REST APIJSONJSONApex ObjectJSON, , VisualforceLightning ComponentApexApexApex newCase.Date_Reported__c = System.today(); I have a background in programming but I just can't understand most of the challenge. Trailmixes. pr.Warehouse_SKU__c = (String)productMap.get(sku); For any superbadge, you will have to install a package before starting. What is a word for the arcane equivalent of a monastery? } I am unaware of any changes. Is there a specific import order? }, PRIVATE STATIC Case createMaintenanceRequest(id vehicleId, id equipmentId){ Connect on telegram if you again face a similar issue, Hi jaffer. 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. addDays+=daysToAdd; Cant remember precisely. List newRoutineMaintenanceVehicleRecordIDList = new List(); Test scheduling logic to confirm action gets queued. List lista = [ Process Automation Specialist step 7 no work. Modified 2 months ago. request.setMethod(GET); Hi shruti. Copyright 2000-2022 Salesforce, Inc. All rights reserved. Issue with step #6 of the Lightning Web Components Specialist superbadge. pr.Cost__c = (Integer)productMap.get(cost); Hey harsh. LWC Superbadge Step 3 - Setup / Clarification. Challenge 4 - MaintenanceHelperTest.class @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(){. tmpCases.add(newCases.get(oldId)); Apex specialist superbadge challenge 4. from Case This repository is for solving all the problems and pass all the challenges in the way of earning this superbadge. Wait for a minute and run it twice maybe before checking challenges. insert product; System.enqueueJob(New WarehouseCalloutService()); } @istest I used this code for MaintenanceRequestHelper: public with sharing class MaintenanceRequestHelper {. cas.Type = 'Repair'; insert newItems; newCases = new List(); Vehicle__c vehicle = createVehicle(); Stuck on Superbadge Apex Specialist Step 4? Equipment_Maintenance_Item__c wp = new Equipment_Maintenance_Item__c(Equipment__c = equipmentId, private static final string REPAIR = Repair; 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]); leastValueMap.put(emi.Maintenance_Request__c,emi); Is it a bug? id equipmentId = equipment.Id; case emptyReq = createMaintenanceRequest(vehicleId,equipmentId); Learn directly from Salesforce experts. @future, Http@futureAPI, @future callout true @future http.send if(!newRoutineMaintenanceVehicleRecordIDList.contains(MRRecord.Vehicle__c)) One question, how does the map newCases get updated with the new Case IDs following the insert tmpCases? private static final string REQUEST_TYPE = Routine Maintenance; newRoutineMaintenanceVehicleRecordIDList.add(MRRecord.Vehicle__c); contact.AccountId = acc.Id; Profile p = [SELECT Id FROM Profile WHERE Name=Standard User]; They do give you a template and a requirements sheet. Apex Specialist is one of the superbadges of Salesforce trailhead (A New Approach to Learning Salesforce) . hi niya 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. TrailheadSalesforce } Hi, Its giving error for me . If nothing happens, download Xcode and try again. insert somethingToUpdate; Equipment_Maintenance_Item__c workP = createWorkPart(equipmentId,somethingToUpdate.id); newProducts.add(pr); test.stopTest(); list allRequest = [select id Case newCase = buildCase(vehicle.Id,'Electrical','DummyFAIL_'+i_fail); insert contact; Vehicle__c vehicle = new Vehicle__c(); newCase.Date_Due__c=Date.today(); public static Equipment_Maintenance_Item__c buildItem(Id caseId, Id equipmentId){ newItem.Equipment__c = equipmentId; @TestSetup //MaintenanceRequestHelper.createNewEquipmentMaintenanceItemList(Trigger.newMap); system.assert(newReq.Subject != null); List newRoutineMaintenanceVehicleRecordIDList = new List(); Use above code for step 5 and then use system assert with constant 0 and returned value will be 0. Do we need to create this lookup relationship between Maintenance Request (Case) and Equipment (Product)? case cs = new case(Type=REPAIR, caseToUpdate.add(newCase); Review the data schema in your modified Salesforce org as you read the detailed requirements below. There was a problem preparing your codespace, please try again. Apex Specialist Superbadge Use integration and business logic to push your Apex coding skills to the limit. I worked through the Exam Prep guidelines. for(Case MRRecord: newMap.values()){ Equipment_Maintenance_Item__c newEMIRecord = new Equipment_Maintenance_Item__c(); Actions to Earn This Superbadge Automate record creation using Apex triggers List emiListToNewCase = new List(); MaintenanceRequestHelper.createNewMaintenanceRequest(Trigger.oldMap,Trigger.newMap); Create an account to follow your favorite communities and start taking part in conversations. When this Superbadge came up, I identified several resources online that helped walk me through it. With that being said, it seems like you need more understanding of the apex coding language in general. if(MRRecord.Vehicle__c==EMIRecord.Maintenance_Request__r.Vehicle__c){ This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository. Trailhead Academy. How can we prove that the supernatural or paranormal doesn't exist? Can anyone explain me how getDueDate() function is defined under class: MaintenanceRequestHelper? System.debug(*** Updated cases: +caseToUpdate.size()); Integer numberAllCases = (Integer) [SELECT COUNT(Id) conteggio FROM Case WHERE Date_Reported__c = TODAY][0].get(conteggio); for(Integer i_ok = 0; i_ok < 300; i_ok ++){ } insert newCases; newItems = new List(); If it works its . newMRRecord.Date_Reported__c=date.today(); Trails. It should work. private static final string WORKING = Working; Learn. Vehicle__c=vehicleId); request.setEndpoint(WAREHOUSE_URL); new List(); newItem.Maintenance_Request__c = newCase.Id; listEquipmentMaintenanceItem.add(newItem); }, public static void createNewEquipmentMaintenanceItem(Map newMap){ if(newEMIRecordList.size()>0){ https://salesforce.quip.com/gJ3QAkFy6boE, Apex SpecialistApexMockApex I think you should focus on gaining more of hands on experiences in handling scenarios similar to those in health cloud domain. Udemy would be a paid platform, hence I'll suggest to first exhaust all the free resources and then jump on to Udemy courses. You must have 100% test coverage to pass this challenge and assert values to prove that your logic is working as expected. public with sharing class MaintenanceRequestHelperTest {. Automate record creation using Apex | by Shiv Shankar | Medium Write Sign up Sign In 500 Apologies, but something went wrong on our end. . Hi Shaid, Please use below code:-. for(AggregateResult res :wpc){ Challenge 2 - WarehouseCalloutService.class All these codes are working 100% and run smoothly to help you achieve the below shiny badge. Variable does not exist: Equipment__c private static final string REQUEST_ORIGIN = Web; If you have just one and a half months experience in Salesforce, apex specialist is a little too early now. I tried to use your code as it is and it gives error..For this superbadge I already read on 7th Dec that Superbadge challenge will be changed on 9th Dec and I am unaware about old superbadge so cant tell you what actual changes are. If you search regarding Apex on YouTube you'll find many more channels and videos. 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]); ~2 hrs 15 mins +2,200 points Module Asynchronous Apex TimeZoneSidKey=America/Los_Angeles, UserName=stdtest@testorg.com); List caseList = new List(); Honestly, I suggest reviewing the trailheads leading up to the apex super badge since the apex specialist Superbadge tests you on those core concepts. newEMIRecordList.add(newEMIRecord); Now, you'll have to map to what needs to done. contact.FirstName = test; This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository. You signed in with another tab or window. for(Integer i_fail = 0; i_fail < 300; i_fail ++){ private static void testMaintenanceRequestPositive(){. } for(Id oldId : oldIdCases){ If nothing happens, download Xcode and try again. public with sharing class MaintenanceRequestHelperTest {. I had posted these at the time i completed them. If you like what I write and it has been ever helpful to you. } Equipment_Maintenance_Item__c newItem = new Equipment_Maintenance_Item__c(); Does ZnSO4 + H2 at high pressure reverses to Zn + H2SO4? Integer daysToAdd = Integer.valueOf(res.get(cycle)); Superbadge Apex Specialist looks good on Resume, and they prove worth it as well. public static void testPositive(){ maintenanceNew.ProductId = product.Id; Choose the Tab (orObject) you want torenameand clickEdit. Thank you for this solution! system.assert(allRequest.size() == 1); By clicking Accept all cookies, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our Cookie Policy. List tmpCases = new List(); Challenge 4: both negative and bulk run successfully but not positive test case. }. Map mapOldCasesWithItems, Map mapOldCasesWithNewCases){. , Test.setMockMock If you are facing any hurdles to complete the challenge, just go through the code. newCase.Vehicle__c=vehicle; if(Trigger.isBefore){ }, @istest When I jumped into the super badge I realised that lack a lot of info surrounding the Superbadge. For that, I would suggest the following udemy course: Salesforce Development Course. product2 equipment = new product2(name = SuperEquipment, Let the universe renounce some goodness to you . This is the message I get: public static String CRON_EXP = 0 0 0 15 3 ? public static void updateWorkOrders(List caseList) { If you're if that type, you can read the apex developer documentation. private static final string REQUEST_SUBJECT = Testing subject; PRIVATE STATIC Vehicle__c createVehicle(){ Thats a technical error. pr.Current_Inventory__c = (Integer)productMap.get(quantity); Code shared by Laendor is not working. 1. https://developer.salesforce.com/docs/atlas.ja-jp.apexcode.meta/apexcode/apex_scheduler.htm, ApexGUISchedulable Apex, [] [] [Apex] Apex , GUISalesforce }, Case newRoutineCase = createNewMaintenanceCase(oneCase.Id, oneCase.Vehicle__c, newDate); } It's pretty comprehensive and contains several examples. } system.debug(EMIList +EMIList); to use Codespaces. I have complete Idea of this coding bt I am not getting what to do before writing this code exactly for this challenge. I highly doubt the entire quest would have changed. Thanks for letting know. }, @isTest } Change the labels for Case and Product To Maintenance Request and Equipment respectively. I am getting Variable does not exist: MaintenanceRequestTest error. This code works perfectly fine for Challenge 1. I create correct algoritm to find less maintenance cycle days. I think everyone has given awesome suggestions , I'll try to add some more insights -. Tips3, PlaygroundTrailhead Reports & Dashboards Specialist . setIdCases.add(caseInList.Id);