Please from Equipment_Maintenance_Item__c Trailblazer CommunityTrailhead, ApexSalesforce Developer, Trailhead vol2. If it works its . insert vehicle; Apex Specialist Challenge 1 too Many DML Rows. Equipment_Maintenance_Item__c newEMIRecord = new Equipment_Maintenance_Item__c(); Please find the link to telegram group on the homepage! if((oneCase.status==closed) && (oneCase.type==Repair || oneCase.type==Routine Maintenance)) { public static Vehicle__c buildVehicle(){ insert emiListToBeUpdated; for(Equipment_Maintenance_Item__c EMIRecord: EMIList){ result.put((Id)res.get(cID),addDays); SYSTEM.assertEquals(newReq.ProductId, equipmentId); Salesforce, 2SalesforceApex SpecialistTips, , Id oldCaseId = item.Maintenance_Request__c; Subject=REQUEST_SUBJECT, insert newCases; List newItems = new List(); Ask Question Asked 1 year, 3 months ago. In that case the post hasnt been updated that much recently. vehicleToEquipmentMap.put(MRRecord.Vehicle__c,EquipmentIDListUpdate); Copyright 2000-2022 Salesforce, Inc. All rights reserved. MaintenanceRequestTest.CreateData( 5,2,2,Repair); If nothing happens, download GitHub Desktop and try again. List wpc= [ For getting more knowledge I'll suggest go to Apex Hours YouTube channel and check-out the developer series. 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. Actions to Earn This Superbadge Automate record creation using Apex triggers contact.Email = test@test.com; newItem.Quantity__c = item.Quantity__c; newItem.Maintenance_Request__c = newCase.Id; listEquipmentMaintenanceItem.add(newItem); Use above code for step 5 and then use system assert with constant 0 and returned value will be 0. mapCases.get(oldCaseId).add(item); List newMRRecordList = new List(); Date newDate = Date.today(); if(result.get(oneCase.Id)!=null) { The author also has a YouTube channel that goes over key concepts which may be helpful: SFDC YouTube Channel Best of luck! if(!leastValueMap.containsKey(emi.Maintenance_Request__c)){ 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. @future please help. Hey sanskar! insert emptyReq; Equipment_Maintenance_Item__c workP = createWorkPart(equipmentId, emptyReq.Id); maintenanceNew.ContactId = contact.Id; They do give you a template and a requirements sheet. newEMIRecord.Maintenance_Request__c=MRRecord.ID; I'm also trying to get more comfortable with Visual Studio Code with the Salesforce extensions. APEX. }. check if u have creted a process builder , i did create a proces builder and deactivated and it worked for me. 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. cas.Status = 'Closed'; TrailheadSalesforce public static void setupTest(){ Try it. Is it a bug? for(Case MRRecord: newMap.values()){ vehicle.Name = car; Case newMRRecord = new Case(); . vehicleToEquipmentMap.put(MRRecord.Vehicle__c,EquipmentIDListUpdate); insert contact; Vehicle__c vehicle = new Vehicle__c(); @isTest FROM Equipment_Maintenance_Item__c where status = :STATUS_NEW]; Equipment_Maintenance_Item__c workPart = [select id Integer daysToAdd = Integer.valueOf(res.get(cycle)); We have a small group to help out each others. trigger MaintenanceRequest on Case (before update, after update, before insert, after insert) { Apex specialist superbadge challenge 4. Step 2. Its a pretty long post that i wrote quiet long time back. 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. Level Up with Salesforce and Win Free Certificate voucher! } insert equipment; https://takesurveyguide.com/safeway-customer-survey/. } emptyReq.Status = WORKING; @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