Where developers & technologists share private knowledge with coworkers, Reach developers & technologists worldwide. result.put((Id)res.get(cID),addDays); newCases.put(oneCase.Id, newRoutineCase); We have a small group to help out each others. Connect on telegram if you again face a similar issue, Hi jaffer. 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. tmpCases.add(newCases.get(oldId)); Map mapOldCasesWithItems, Map mapOldCasesWithNewCases){. } Automate record creation | Apex Specialist | Salesforce - YouTube 0:00 / 8:46 Automate record creation | Apex Specialist | Salesforce wonder studies 5.79K subscribers Subscribe 517 Share. Does ZnSO4 + H2 at high pressure reverses to Zn + H2SO4? Hi, Its giving error for me . if(vehicleToEquipmentMap.get(MRRecord.Vehicle__c)!=null){ This Superbadge is part of training/preparation for Platform Developer I Certification exam. There was a problem preparing your codespace, please try again. newCase.Status=closed; product.isActive = true; Currently there arent any specific certification related to health cloud. vehicleList.add(createVehicle()); } Retry the process aforementioned. Step 2. EquipmentIDListUpdate.add(EMIRecord.Equipment__c); I have a background in programming but I just can't understand most of the challenge. private static final string REQUEST_SUBJECT = Testing subject; PRIVATE STATIC Vehicle__c createVehicle(){ Please find the link to telegram group on the homepage! }. public with sharing class MaintenanceRequestHelperTest {. } 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 Superbadge Process Automation Specialist Full Solutions. } Decimal maintenanceCycle = 0; for(Case caseInList: caseList){ newEMIRecord.Quantity__c=EMIRecord.Quantity__c; Udemy would be a paid platform, hence I'll suggest to first exhaust all the free resources and then jump on to Udemy courses. e.Equipment__c = emis.Equipment__c; }, public static void createNewEquipmentMaintenanceItem(Map newMap){ SYSTEM.assertEquals(newReq.ProductId, equipmentId); newCase.Date_Due__c=Date.today(); public static Equipment_Maintenance_Item__c buildItem(Id caseId, Id equipmentId){ Now, you'll have to map to what needs to done. Please lemme know if works. } Good luck to you all if you are working on this superbadge or preparing for the Salesforce Platform Developer II certification. Superbadge Apex Specialist Full Solutions 13 June 2020 by Nitin Raj Table of Contents Challenge 1: Automate record creation Challenge 2: Synchronize Salesforce data with an external system Challenge 3: Schedule synchronization Challenge 4: Test automation logic Challenge 5: Test callout logic Challenge 6: Test scheduling logic } Please Check this answer if this helps. newCase.Date_Reported__c=Date.today(); Case newCase = new Case(); i wanted to excel myself in healthcloud domain of salesforce as i have started badges of that domain on trailhead if(Trigger.isBefore){ We are always on the hunt for writers that have something interesting to say! Please help me out, have you solved this if yes please help me, i have already used Queueable interface for WarehouseCalloutService class now i m stuck on step 5 with Test class WarehouseCalloutServiceTest , can you please help me with Test class code ,underlying is the Queueable interface code of WarehouseCalloutService class. return wp; public static Vehicle__c buildVehicle(){ To subscribe to this RSS feed, copy and paste this URL into your RSS reader. System.enqueueJob(New WarehouseCalloutService()); Here is the code for bulk scenario testing which worked for me. check the solution martland has linked, lemme know if it is working fin https://salesforce.stackexchange.com/questions/336871/apex-specialist-challenge-1-productid-null/341363#341363. newCase.Date_Due__c=newDate; private static void linkEquipmentsToNewCases( product.Maintenance_Cycle__c = 2; 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. @istest { newEquipment.Lifespan_Months__c = 10; MaintenanceRequestHelper.updateWorkOrders(); b. Use above code for step 5 and then use system assert with constant 0 and returned value will be 0. // Sync with Warehouse Its been long time I completed those quests. Vehicle__c=vehicleId); As it's currently written, it's hard to understand your solution. Status=STATUS_NEW, maintenanceNew.Subject = 'Other'; Apex SpecialistApexMockApex Tips3 Playground Trailhead - Reports & Dashboards Specialist . Vehicle__c vehicle = createVehicle(); I am not able understand the issue, can you please help?? Start a discussion in the forum to get straight-up answers. Any help appreciated! . List newEMIRecordList = new List(); Reddit and its partners use cookies and similar technologies to provide you with a better experience. Mock, Create your own notes with your understanding and you can ask a senior at work to review them for you. By accepting all cookies, you agree to our use of cookies to deliver and maintain our services and site, improve the quality of Reddit, personalize Reddit content and advertising, and measure the effectiveness of advertising. private static void testMaintenanceRequestNegative(){ }. 2022; static testmethod void testjob(){ But I have created it as you can see in below image. mapCases.get(oldCaseId).add(item); Variable does not exist: Equipment__c newCase.Type=typeCase; what objects I have to make all those things..Can anyone please give Stepwise ,clear and simplified solution of the same? autocad lt download 2022 reciprocal development mcat; craigslist northwest indiana cars for sale by owner chain link fence home depot; zillow winter garden fl real little backpacks; chase bank nearby The followings are the challenges to earn this badge: Automate record creation using Apex triggers. } Try the same thing. }. @future }. }, Case newRoutineCase = createNewMaintenanceCase(oneCase.Id, oneCase.Vehicle__c, newDate); Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Integer daysToAdd = Integer.valueOf(res.get(cycle)); User u = new User(Alias = stdtest, Email=stdtest@testorg.com, insert workPartList; test.startTest(); Http http = new Http(); 1. List EquipmentIDListUpdate = vehicleToEquipmentMap.get(MRRecord.Vehicle__c); newItem.Quantity__c = item.Quantity__c; I had mine and wrote this while doing so, Free Salesforce Exam Coupon Codes for 2022. Salesforce Consultant || 6X Certified Salesforce || 1X DevOps Certified || TrailheadRanger || Salesforce Lover || Follow me at https://shivshankarsfdc.com/, 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. For the first release, there are four Superbadges that you can earn: Apex Specialist I'm going to go into depth a little bit more about the Apex Specialist badge a little later on, but this one focuses heavily on apex customization via triggers, scheduled apex and apex callouts. Can anyone explain me how getDueDate() function is defined under class: MaintenanceRequestHelper? 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. Try running this query in your developer org: SELECT Id, JobType, MethodName, Status FROM AsyncApexJob WHERE CompletedDate = TODAY. Account acc = new Account(); Map mapOldCasesWithItems = getItemsInOldCases(caseList); newCase.Date_Reported__c=Date.today(); Equipment_Maintenance_Item__c newItem = new Equipment_Maintenance_Item__c(); Its a pretty long post that i wrote quiet long time back. List newRoutineMaintenanceVehicleRecordIDList = new List(); from Case for(Equipment_Maintenance_Item__c EMIRecord: EMIList){ } Vehicle__c newVehicle = new Vehicle__c(); insert tmpCases; public static Map getDueDate(List CaseIDs) { Follow guided learning paths. How can I find out which sectors are used by files on NTFS? Request you to please update Challenge 1. } Is that just automatically done behind the scenes? @istest Are you sure you want to create this branch? How to react to a students panic attack in an oral exam? }, private static Map getItemsInOldCases(List caseList){ newItem.Maintenance_Request__c = caseId; MaintenanceRequestHelper.createNewEquipmentMaintenanceItem(Trigger.newMap); https://techevangel.com/2018/06/01/superbadge-advanced-apex-specialist/. }, insert listEquipmentMaintenanceItem; setIdCases.add(caseInList.Id); CronTrigger is similar to a cron job on UNIX systems. Product2 product = [SELECT Id, Name, isActive, Maintenance_Cycle__c, Replacement_Part__c FROM Product2 WHERE Name = test LIMIT 1]; for(Integer i=1;i<=1000;i++){ Try logging in and out and reverify. Apex Specialist Superbadge Data Integration Specialist Superbadge Lightning Component Framework Specialist Superbadge PROJECT: Build a Conference Management App [3 hrs 40 mins] Lightning Experience Reports & Dashboards Specialist [4 - 6 hrs] takes the place of the "Reports & Dashboards Specialist" superbadge retired in 2017. oldNewCaseMap.put(c.Id,newCase); if(MRRecord.Type==Routine Maintenance){ Hi @Edgar Moran, Can you please send me complete code of this "Unlock the Apex Specialist Superbadge". insert vehicle; Product2 product = new Product2(); I would recommend you to follow the blog rather than looking into the code. Map productMap = (Map) p; Superbadge will have some hints on what you are expected to do. Press question mark to learn the rest of the keyboard shortcuts. rev2023.3.3.43278. newCase.Origin = 'Phone'; Hi Admin, for(case req : requestList){ I can fairly understand parts of it but never get the compete picture. if(c.Type == 'Repair' || c.Type == 'Routine Maintenance'){ insert newMRRecordList; ( Automate record creation ), I face this error what can I do please Help me. 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]); Do lemme know if you find solutions codes that work well for it. Contact contact = [SELECT Id, FirstName, LastName,Email,AccountId FROM Contact WHERE Email = test@test.com LIMIT 1]; Share to someone in the Trailhead Community. By rejecting non-essential cookies, Reddit may still use certain cookies to ensure the proper functionality of our platform. List caseToUpdate = new List(); 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. caseToUpdate.add(newCase); By clicking Post Your Answer, you agree to our terms of service, privacy policy and cookie policy. What video game is Charlie playing in Poker Face S01E07? maintenanceNew.Product__c = product.Id; Start a discussion in the forum to get straight-up answers. insert workP; test.startTest(); Hey harsh. LWC Superbadge Step 3 - Setup / Clarification. newMRRecord.Type=Routine Maintenance; Salesforce The author also has a YouTube channel that goes over key concepts which may be helpful: SFDC YouTube Channel Best of luck! Do we need to create this lookup relationship between Maintenance Request (Case) and Equipment (Product)? Apex Specialist is one of the superbadges of Salesforce trailhead (A New Approach to Learning Salesforce) . Maybe not optimized! insert newItems; newCases = new List(); } This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository. Map result = new Map(); maintenanceNew.ProductId = product.Id; replacement_part__c = true); This repository is for solving all the problems and pass all the challenges in the way of earning this superbadge. Vehicle__C vehicle = createVehicle(); public static void setupTest(){ MaintenanceRequestHelper.updateNewMaintenanceRequest(Trigger.new); Unlock, Apex Specialist Super Badge insert equipment; 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. insert newItems; Rename cases and products to match the HowWeRoll schema, and assign all profiles to the custom HowWeRoll page layouts for those objects. } A place where magic is studied and practiced? for(Equipment_Maintenance_Item__c item: lista){ FROM Equipment_Maintenance_Item__c for(Case MRRecord: newMap.values()){ List newCaseList = new List(); Superbadges - Apex Specialist (The 'MaintenanceRequest' trigger does not appear to be handling bulk operations correctly) Hi guys, I'm almost finished with the test to get tge Apex Specialist SuperBadge, I attempt to validate the "Test automation logic" but I can't really see what is my error or why is not passing. contact.LastName = last; newCaseList.add(newCase); How can we prove that the supernatural or paranormal doesn't exist? List caseToUpdate = new List(); public static void updateWorkOrders(List caseList) { request.setMethod(GET); Advanced-Apex-Specialist Showcase your mastery of business process automation without writing a line of code. for(Case MRRecord: newList){ System.schedule , JobIdJobIDCronTriggerJob Modified 2 months ago. admin https://developer.salesforce.com/docs/atlas.ja-jp.apexcode.meta/apexcode/apex_scheduler.htm, ApexGUISchedulable Apex, [] [] [Apex] Apex , GUISalesforce I want to know that which part of my code is wrong, not just answer. Refresh the page, check. addDays+=daysToAdd; salesforcedx-cli vs-code trailhead sfdx-plugin superbadges Chuck 805 asked Jan 22, 2021 at 0:05 6 votes 2 answers 5k views vehicle.Name = car; }, PRIVATE STATIC Product2 createEq(){ , private static final String WAREHOUSE_URL = https://th-superbadge-apex.herokuapp.com/equipment’; global class WarehouseSyncSchedule implements Schedulable {, global void execute(SchedulableContext ctx) { }. if(res.get(cycle)!=null){ List wpc= [ Stuck on Superbadge Apex Specialist Step 6? Apex Specialist. Can you please help me out, I am also getting the same error. Please edit your answer to include an explanation of your code. // List caselist = [Select count(id) from case where case] Could you please point out the specific line of the code where the function has been used for me to check and get back to you more quickly. 2023 TechForce Services. Synchronize Salesforce data with an external system using asynchronous REST callouts. Date newDate = Date.today(); if(result.get(oneCase.Id)!=null) { maintenanceNew.Status = 'New'; acc.Name = test; 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. else{ Equipment_Maintenance_Item__c newEMIRecord = new Equipment_Maintenance_Item__c(); Please help ! list requestList = new list(); EmailEncodingKey=UTF-8, LastName=Testing, LanguageLocaleKey=en_US, List newEMIRecordList = new List(); 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). This is probably the simplest of all the steps.. update theTestDataFactory class to handle the key requirements given.. It should work. newMRRecord.Date_Reported__c=date.today(); } Apex specialist superbadge challenge 4. Map newCases = new Map(); Hope it helps. I used this code for MaintenanceRequestHelper: public with sharing class MaintenanceRequestHelper {. Challenge 2 - WarehouseCalloutService.class SELECT Maintenance_Request__r.ID cID, MIN(Equipment__r.Maintenance_Cycle__c)cycle Honestly, I suggest reviewing the trailheads leading up to the apex super badge since the apex specialist Superbadge tests you on those core concepts. private static void testMaintenanceRequestBulk(){ somethingToUpdate.status = CLOSED; , Super from case Closing a Maintenance Request of type 'Routine Maintenance' or 'Repair' did not create of a new Maintenance Request with the correct due date. requestList.add(createMaintenanceRequest(vehicleList.get(i).id, equipmentList.get(i).id)); $ sfdx force:source:retrieve -n NameOfThePackage This will retrieve all the components in the package into a new folder named as the package. private static final string CLOSED = Closed; salesforce Share Improve this question Follow Search for an answer or ask a question of the zone or Customer Support. newEMIRecord.Quantity__c=EMIRecord.Quantity__c; I have access to udemy too so could someone mention a course or something. I think everyone has given awesome suggestions , I'll try to add some more insights -. public with sharing class WarehouseCalloutService implements queueable, Database.AllowsCallouts { insert contact; Vehicle__c vehicle = new Vehicle__c(); Equipment_Maintenance_Item__c newItem = new Equipment_Maintenance_Item__c(); System.assertEquals(1000,caseList.size()); for(Case cas:caseList){ newCase.Vehicle__c = c.Vehicle__c; Asking for help, clarification, or responding to other answers. Thanks for your wonderful gesture of letting know, I am also geating the same error . leastValueMap.put(emi.Maintenance_Request__c,emi); Equipment_Maintenance_Item__c wp = new Equipment_Maintenance_Item__c(Equipment__c = equipmentId, id equipmentId = equipment.Id; case emptyReq = createMaintenanceRequest(vehicleId,equipmentId); List createdCases = [Select Id from Case where Type = Routine Maintenance]; Case newCase = buildCase(vehicle.Id,'Repair','DummyOK_'+i_ok); I had cleared this superbadge way back in time would have to seriously redo it to understand what was done on this one. insert newCases; newItems = new List(); Challenge 4 - MaintenanceHelperTest.class Thanks again for pointing it out. Dont forget to create the chatter group , update the product trigger to handle only, Override the New and Edit buttons under the Order object to use the OrderEdit visualforce page. case cs = new case(Type=REPAIR, trigger MaintenanceRequest on Case (before update, after update, before insert, after insert) { Hey Haja. if(newMRRecordList.size()>0){ newCase.Origin=web; newCase.Type = 'Routine Maintenance'; What am I doing wrong here in the PlotLegends specification? I started working on this superbadge and this post is to document some of the findings / tips / gotchas as I progress through this one. Thanks for letting know. Hey itachi, try debugging the code and look where the issue is. Learn in-demand skills. } @future, Http@futureAPI, @future callout true @future http.send } enter image description here Tried creating another playground but still same issue. I think you should focus on gaining more of hands on experiences in handling scenarios similar to those in health cloud domain. It did not work for me. where status = :STATUS_NEW]; Equipment_Maintenance_Item__c workPart = [select id } } Please help! maintenanceCycle=EMIRecord.Equipment__r.Maintenance_Cycle__c; Hey Ms ! Trailmixes. To learn more, see our tips on writing great answers. //MaintenanceRequestHelper.createNewEquipmentMaintenanceItemList(Trigger.newMap); MaintenanceRequestTest.CreateData( 5,2,2,Repair); Challenge 2: Synchronize Salesforce data with an external system. Hi, maintenanceNew.ContactId = contact.Id; private static final string STATUS_NEW = New; Is there a proper earth ground point in this switch box? You signed in with another tab or window. Learn more. Concepts tested in this superbadge include: Apex Triggers . Map vehicleToEquipmentMap = new Map(); ApexSchedulable , execute, For getting more knowledge I'll suggest go to Apex Hours YouTube channel and check-out the developer series. Choose the Tab (orObject) you want torenameand clickEdit. Discover your ideal career. 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. system.debug(newEMIRecordList.size() +newEMIRecordList.size()); insert equipmentList; for(integer i = 0; i < 300; i++){ If you're if that type, you can read the apex developer documentation. contact.AccountId = acc.Id; Showcase your mastery of business process automation without writing a line of code. Challenge 6 - WarehouseSyncScheduleTest.class. Challenge 1 - MaintenanceRequest.trigger and MaintenanceRequestHelper.class I'm working on the Apex Specialist super badge on the Salesforce Trailhead. for(Integer i_fail = 0; i_fail < 300; i_fail ++){ Viewed 5k times . Date todayDate = System.today(); Trails. // TODO: Complete the method to update workorders, public static void createNewMaintenanceRequest(Map oldMap, Map newMap){ Yeah, well make that someone yourself and do whatever the hell you want.. Maintenance Request to the same vehicle . Accelerate learning across your organization. System.debug(*** Total cases (expected 900): +numberAllCases); }, @istest I would recommend you to follow the blog rather than looking into the code. TrailheadSalesforce Use Git or checkout with SVN using the web URL. Are you sure you want to create this branch? newEMIRecord.Equipment__c=EMIRecord.Equipment__c; system.assert(allRequest.size() == 1); update somethingToUpdate; Case newReq = [Select id, subject, type, Date_Reported__c, Vehicle__c, Date_Due__c pr.Replacement_Part__c = (Boolean)productMap.get(replacement); insert product; Advanced-Apex-Specialist-Salesforce-Super-Badge. } jaran@wezana.solutions, @isTest private class MaintenanceRequestHelperTest {, @testSetup mukesh gupta. When I jumped into the super badge I realised that lack a lot of info surrounding the Superbadge. for(Case newCase : [SELECT Id, Comments, Vehicle__c, Status FROM Case WHERE Subject LIKE DummyOK%]){ if(MRRecord.Status!= oldMap.get(MRRecord.ID).Status && MRRecord.Status == Closed && (MRRecord.Type==Repair || MRRecord.Type==Routine Maintenance)){ if(MRRecord.Vehicle__c==EMIRecord.Maintenance_Request__r.Vehicle__c){ In that case the post hasnt been updated that much recently. vehicleToEquipmentMap.put(MRRecord.Vehicle__c,EquipmentIDListUpdate); List emiListToBeUpdated = new List(); for(case c:caseList){ if(Trigger.isUpdate){ I have followed all your steps correctly, But Im still having this error every single time in 3rd challenge. newItems.add(i2); 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! } private static void testMaintenanceRequestPositive(){. 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]); for(Integer i_fail = 0; i_fail < 300; i_fail ++){ This query will return all completed batch, future, and queryable jobs that were completed today. You must have 100% test coverage to pass this challenge and assert values to prove that your logic is working as expected. } If nothing happens, download Xcode and try again. If you search regarding Apex on YouTube you'll find many more channels and videos. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. } Schedule synchronization using Apex code. HttpResponse response = http.send(request); I am getting Variable does not exist: MaintenanceRequestTest error. You have to rename the two standard fields as indicated and then the mentioned changes in apex and trigger codes. } return equipment; newEquipment.Replacement_Part__c = true; public static Case buildCase(Id vehicleId, String typeCase, String subjectCase){ Method does not exist or incorrect signature: void CreateData(Integer, Integer, Integer, String) from the type MaintenanceRequestHelper. update caseToUpdate; and Schema Equipment_Maintenance_Item__c instead of Work_Part__c. For any superbadge, you will have to install a package before starting. } system.debug('leastValueMap '+leastValueMap); for(Case c : caseList){ You have to insert as many work parts records for each inserted new case record. FROM Equipment_Maintenance_Item__c where Maintenance_Request__r.ID in :caseKeys.keySet() Could you please point out the specifics. Please create a seperate trailhead playground for each superbadge challenge. }. Case maintenanceNew = new Case(); I have complete Idea of this coding bt I am not getting what to do before writing this code exactly for this challenge. if(newEMIRecordList.size()>0){ Work fast with our official CLI. So with that I could solve it. List items = mapOldCasesWithItems.get(idOld); newDate = Date.today()+result.get(oneCase.Id); I have Class name MaintenanceRequestHelper and i am adding it but still it not accepting this getting below error. ChangethelabelsforStandard Objectsand Fields in SalesforceGo to Setup -> Customize -> Tab Names andLabels->RenameTabs andLabels. Product2 pr = new Product2(); newEMIRecordList.add(newEMIRecord); For that, I would suggest the following udemy course: Salesforce Development Course. , ApexApex()75%Apex(1%) mapCases.put(oldCaseId,new List()); @isTest So glad you cared to share this. List externalProducts = (List) JSON.deserializeUntyped(response.getBody()); product.Replacement_Part__c = true; for(AggregateResult res :wpc){ private static Map createNewCases(List caseList) { Vehicle__c vehicle = buildVehicle(); 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.