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. } Thanks I would go over this course. You signed in with another tab or window. return wp; Thanks again buddy. Lightning Experience Specialist I'm working on the Apex Specialist super badge on the Salesforce Trailhead. private static final string REQUEST_SUBJECT = Testing subject; PRIVATE STATIC Vehicle__c createVehicle(){ If multiple equipments are used in the maintenance request, choose the shortest maintenance cycle to define the service date. static void allTheDataForThisTestClass() {. System.debug(*** Total cases (expected 900): +numberAllCases); } Hey harsh. Learn directly from Salesforce experts. Refresh the page, check. }, @istest System.debug(*** Total cases (expected 600): +numberAllCases); And I might not be the best to advice on that particular section. newEMIRecord.Equipment__c=EMIRecord.Equipment__c; Request you to please update Challenge 1. // List caselist = [Select count(id) from case where case] } Start a discussion in the forum to get straight-up answers. private class MaintenanceRequestHelperTest {, @testSetup To subscribe to this RSS feed, copy and paste this URL into your RSS reader. The author also has a YouTube channel that goes over key concepts which may be helpful: SFDC YouTube Channel Best of luck! Actions to Earn This Superbadge Automate record creation using Apex triggers I'm having a really hard time finishing this challenge. and Schema Equipment_Maintenance_Item__c instead of Work_Part__c. workPartList.add(createWorkPart(equipmentList.get(i).id, requestList.get(i).id)); Map result = getDueDate(caseList); for(Case oneCase : caseList) { MRRecord.Date_Due__c=MRRecord.Date_Due__c + integer.valueOf(maintenanceCycle); System.debug(*** Updated cases: +caseToUpdate.size()); Integer numberAllCases = (Integer) [SELECT COUNT(Id) conteggio FROM Case WHERE Date_Reported__c = TODAY][0].get(conteggio); newCase.Origin=web; for(Equipment_Maintenance_Item__c emi : emiList){ where status =: STATUS_NEW]; list workParts = [select id Hey sanskar! } List EquipmentIDListUpdate = vehicleToEquipmentMap.get(MRRecord.Vehicle__c); Date todayDate = System.today(); enter image description here Tried creating another playground but still same issue. 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 system.debug('leastValueMap '+leastValueMap); for(Case c : caseList){ Case newCase = new Case(); } You have to rename the two standard fields as indicated and then the mentioned changes in apex and trigger codes. update caseToUpdate; If nothing happens, download Xcode and try again. Map caseKeys = new Map (CaseIDs); Hope this helps. Map mapOldCasesWithItems = getItemsInOldCases(caseList); Case newCase = mapOldCasesWithNewCases.get(idOld); Superbadge will have some hints on what you are expected to do. Reddit and its partners use cookies and similar technologies to provide you with a better experience. maintenanceNew.AccountId = acc.Id; EquipmentIDListUpdate.add(EMIRecord.Equipment__c); For that, I would suggest the following udemy course: Salesforce Development Course. Rename cases and products to match the HowWeRoll schema, and assign all profiles to the custom HowWeRoll page layouts for those objects. Ask Question Asked 1 year, 3 months ago. Create and follow custom learning playlists. } I can fairly understand parts of it but never get the compete picture. This was my last superbadge and by completing thisAdvanced Apex Specialist Superbadge, I became eligible forPlatform Developer II certificate. } LocaleSidKey=en_US, ProfileId = p.Id, 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]); Http http = new Http(); HttpResponse response = http.send(request); ApexSchedulable , execute, System.assert(numberAllCases==900); Trailblazer CommunityTrailhead, ApexSalesforce Developer, Trailhead vol2. A tag already exists with the provided branch name. } Its been long time I completed those quests. insert vehicleList; Would have to get back to you. update caseToUpdate; What is a word for the arcane equivalent of a monastery? List EquipmentIDListUpdate = new List(); Id oldCaseId = item.Maintenance_Request__c; } Can you please help me out, I am also getting the same error. REST APIJSONJSONApex ObjectJSON, , VisualforceLightning ComponentApexApexApex pr.ProductCode = (String)productMap.get(_id); Is that just automatically done behind the scenes? Integer daysToAdd = Integer.valueOf(res.get(cycle)); Case newCase = buildCase(vehicle.Id,'Repair','DummyOK_'+i_ok); } im geting error, 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. Advanced-Apex-Specialist Showcase your mastery of business process automation without writing a line of code. User u = new User(Alias = stdtest, Email=stdtest@testorg.com, List secondList = new List(); Account acc = [SELECT Id, Name FROM Account WHERE Name = test LIMIT 1]; 5 Comments on Apex Superbadge (part-1) Scenario:- Automate record creation. insert workPartList; test.startTest(); Learn. newCase.Comments = New comment!; Install the unmanaged package for the schema and stubs for Apex classes and triggers. for(Equipment_Maintenance_Item__c item: lista){ { }, public static void createNewEquipmentMaintenanceItem(Map newMap){ ApexSOQL100, Apex maintenanceNew.Date_Due__c = Date.today(); caseList.add(maintenanceNew); Modifications to the below Apex Classes as below. newCase.Status=closed; addDays+=daysToAdd; } if(response.getStatusCode() == 200) Asking for help, clarification, or responding to other answers. Its a pretty long post that i wrote quiet long time back. newEquipment.Maintenance_Cycle__c = 10; newCase.Date_Due__c=newDate; private static void linkEquipmentsToNewCases( This repository is for solving all the problems and pass all the challenges in the way of earning this superbadge. sign in Also search for blogs, articles regarding it. SELECT Maintenance_Request__r.ID cID, MIN(Equipment__r.Maintenance_Cycle__c)cycle You signed in with another tab or window. maintenanceNew.Product__c = product.Id; Thanks for your wonderful gesture of letting know, I am also geating the same error . Trailhead solution for Apex Specialist superbadge Challenge 1 - MaintenanceRequest.trigger and MaintenanceRequestHelper.class Challenge 2 - WarehouseCalloutService.class Challenge 3 - WarehouseSyncSchedule.class Challenge 4 - MaintenanceHelperTest.class Challenge 5 - WarehouseCalloutServiceMock.class and WarehouseCalloutServiceTest.class if((oneCase.status==closed) && (oneCase.type==Repair || oneCase.type==Routine Maintenance)) { 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. List tmpCases = new List(); Challenge 2 - WarehouseCalloutService.class , Greeting Laendor, Salesforce, Trailhead, superbadge How can I find out which sectors are used by files on NTFS? Challenge 5 - WarehouseCalloutServiceMock.class and WarehouseCalloutServiceTest.class I ll look into it and get back to you shortly. } Please update challenge 6 as well as all the related material. Check the name of the apex class created and match it in same fashion. newItem.Quantity__c = item.Quantity__c; ChangethelabelsforStandard Objectsand Fields in SalesforceGo to Setup -> Customize -> Tab Names andLabels->RenameTabs andLabels. I am not able understand the issue, can you please help?? Superbadge Apex Specialist looks good on Resume, and they prove worth it as well. leastValueMap.put(emi.Maintenance_Request__c,emi); I have Class name MaintenanceRequestHelper and i am adding it but still it not accepting this getting below error. Please note that I also have separate method to cover positive and negative scenarios. pr.Current_Inventory__c = (Integer)productMap.get(quantity); newCase.Equipment__c = leastValueMap.get(c.Id).Equipment__c; } I have a background in programming but I just can't understand most of the challenge. private static void testMaintenanceRequestNegative(){ i wanted to excel myself in healthcloud domain of salesforce as i have started badges of that domain on trailhead Trailmixes. As bejng the solo running admin to this page i might not be able to update the solutions on short notice. public static void updateWorkOrders(List caseList) { newItem.Quantity__c = 10; Trailheads are good for general understanding of a concept whereas the super badge is a test of that concept in a scenario. private static void testMaintenanceRequestPositive(){. Connect on telegram if you again face a similar issue, Hi jaffer. newMRRecord.Vehicle__c = MRRecord.Vehicle__c; from Equipment_Maintenance_Item__c Viewed 5k times . for(Equipment_Maintenance_Item__c EMIRecord: EMIList){ 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. Here is the code for bulk scenario testing which worked for me. }, Case newRoutineCase = createNewMaintenanceCase(oneCase.Id, oneCase.Vehicle__c, newDate); //MaintenanceRequestHelper.createNewEquipmentMaintenanceItemList(Trigger.newMap); List lista = [ Are you sure you want to create this branch? Vehicle__c=vehicleId); vehicle.Name = car; Try running this query in your developer org: SELECT Id, JobType, MethodName, Status FROM AsyncApexJob WHERE CompletedDate = TODAY. where Maintenance_Request__c = :newReq.Id]; system.assert(workPart != null); Apex Specialist Superbadge Null Reference on Challenge 4. Apex Specialist Challenge 1 too Many DML Rows. GROUP BY Maintenance_Request__r.ID ]; }. I think you should focus on gaining more of hands on experiences in handling scenarios similar to those in health cloud domain. Apex This is probably the simplest of all the steps.. update theTestDataFactory class to handle the key requirements given.. Hi Niya. But i will surely get back to you on this. With that being said, it seems like you need more understanding of the apex coding language in general. Hey Ms ! 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. Set caseIdSet = new Set(); Map oldNewCaseMap = new Map(); I started working on this superbadge and this post is to document some of the findings / tips / gotchas as I progress through this one. oldRequestIds.add(req.Id); trigger MaintenanceRequest on Case (before update, after update, before insert, after insert) { insert acc; Contact contact = new Contact(); Step 1. Are you sure you want to create this branch? newCase.Date_Reported__c=Date.today(); SYSTEM.assertEquals(newReq.Vehicle__c, vehicleId); Trailhead solution for Apex Specialist superbadge. Discover your ideal career. insert emiListToBeUpdated; if(Trigger.isInsert){ newCases.add(newCase); Review the data schema in your modified Salesforce org as you read the detailed requirements below. Career Paths. check if u have creted a process builder , i did create a proces builder and deactivated and it worked for me. contact.LastName = last; Also various YouTube videos and blogs exist. where Maintenance_Request__c in: oldRequestIds]; system.assert(allRequests.size() == 300); As it's currently written, it's hard to understand your solution. Equipment_Maintenance_Item__c newItem = new Equipment_Maintenance_Item__c(); 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++){ For getting more knowledge I'll suggest go to Apex Hours YouTube channel and check-out the developer series. There was a problem preparing your codespace, please try again. Challenge 4: both negative and bulk run successfully but not positive test case. Superbadge Process Automation Specialist Full Solutions. newCase.Subject = 'Test Subject'; Please update challenge 6 and all the respective things related to it. newCase.Vehicle__c = c.Vehicle__c; I would recommend you to follow the blog rather than looking into the code. By clicking Accept all cookies, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our Cookie Policy. for(Equipment_Maintenance_Item__c EMIRecord: EMIList){ I have followed all your steps correctly, But Im still having this error every single time in 3rd challenge. I used this code for MaintenanceRequestHelper: public with sharing class MaintenanceRequestHelper {. insert equipmentList; for(integer i = 0; i < 300; i++){ insert equipment; List newCases = new List(); } Code shared by Laendor is not working. } Trailhead Academy. For that, I would suggest the following udemy course: Salesforce Development Course. 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. @isTest I had cleared this superbadge way back in time would have to seriously redo it to understand what was done on this one. caseToUpdate.add(newCase); maintenanceNew.ProductId = product.Id; It is nothing but the name of the class created earlier. } By clicking Post Your Answer, you agree to our terms of service, privacy policy and cookie policy. I'm also trying to get more comfortable with Visual Studio Code with the Salesforce extensions. } }, Hi, can anyone help me out with Challenge 4 in apex specialist? Hi, insert newEMIRecordList; } By rejecting non-essential cookies, Reddit may still use certain cookies to ensure the proper functionality of our platform. 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! ), Press J to jump to the feed. Apex Specialist. Thats a technical error. Almost every step has assistance posted on the Salesforce Developer and Trailblazers forums. 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]);