function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Javeed ShaikJaveed Shaik 

Challenge Not yet complete... here's what's wrong: The Case object has not been renamed to 'Maintenance Request'.

Hi All,

I am not able to complete Apex Specialist Super Badge Chlallenge, getting this error "Challenge Not yet complete... here's what's wrong:  The Case object has not been renamed to 'Maintenance Request'." but I have already renamed the tab names because we cannot change the API name we can only change the lables.

Please help me in this.

Thanks in Advance,
Javeed Shaik

error
SandhyaSandhya (Salesforce Developers) 
Hi,

Make sure that you followed these steps 

In Setup, go to Customize | Tabs Names and Labels in Salesforce Classic.
In LEX, go to Setup Home | User Interface | Rename Tabs and Labels.

Hope this helps you!

If this helps you please mark it as solved.

Thanks and Regards
Sandhya

 
Javeed ShaikJaveed Shaik
Hi Sandhya,

Thanks for your response but I have already done this, as you can see the renamed tabs in the attachment in my post above.

Regards
Javeed
SandhyaSandhya (Salesforce Developers) 
Hi Javeed,

From your screenshot I can see that you have renamed your tab as "Maintenance Requests" but in the trailhead, it is given as "Maintenance Request" with out s in the end.I suggest always copy paste the label or field names from the given module in the trailhead.

Hope this helps you!

If this helps you, please mark it as solved.

Thanks and Regards
Sandhya
Shubham NandwanaShubham Nandwana

Hi ,

I am getting the same problem, even after changing the name to 'Maintenance Request' in both singular and plural forms.
Can anyone tell me what I am doing wrong?
Regards,
Shubham Nandwana

Saikrishna Yadav 1Saikrishna Yadav 1
Are you using old TH playground or New one?,there may be a chance to get error when using the old one....trying with new one may be work
Sudheer A 4Sudheer A 4
Hi I have faced the same problem, The issue I observed is if you are installing the "Install this unmanaged package" by clicking the link on "https://trailhead.salesforce.com/en/super_badges/superbadge_apex", this will install in your loogedin Org. Now When you try to do the challenge in "My Trailhead Play Ground" if you will face the problem.

What I did is I opened the "My TraTrailhead Play Ground copied the link "packaging/installPackage.apexp?p0=04t36000000i5UM" and in home page pasted like below, now we caninstall the package in "My Trailhead Play Ground" .
 " https://*************.my.salesforce.com/packaging/installPackage.apexp?p0=04t36000000i5UM.

Check if this is helpful.
Mitchell Young 17Mitchell Young 17
Do help me to complete this tsk.It is helpful
vignesh s 51vignesh s 51

Challenge Not yet complete... here's what's wrong: 
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. 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.
Close errors how to clear that error?
Dev0088Dev0088
Hi,
I am still unable to complete this challenge. Receiving error 'Challenge Not yet complete... here's what's wrong: 
The Case object has not been renamed to 'Maintenance Request'. Though I have changed the name and also installed the package in new Trailhead playground. Please help.
Dmytro Kovalchuk 8Dmytro Kovalchuk 8
Hi, please follow steps as mentioned Sudheer A 4.
1. Launch your org (I did it at incognito browser mode);
2. Paste /packaging/installPackage.apexp?p0=04t36000000i5UM after User-added image

Hope it will help
Kiran Allagadapa 32Kiran Allagadapa 32
Hi friends,

Even i am facing same issue even changing the case object rename to 'Maintainance Request'.

Here below screen shot shows details,

User-added image

User-added image

tried number of times but no use. help me out to close this challenge.

Regards,
Kiran 
Saikumar JSaikumar J
Make sure you rename Case to Maintenance Request and Product to Equipment.

Hope this helps you!

Regards,
Saikumar
Tien Le 488Tien Le 488
I had the same problem "Challenge Not yet complete... here's what's wrong: 
The Case object has not been renamed to 'Maintenance Request'. Though I have changed the name and also installed the package in new Trailhead playground" and noted that there was an issue with clicking Launch "My Trailhead Playground 5" and I'm not taken to my TP5 but kept asking for sign in.  This is not normal.  So I tried creating a 6th TP and Launch takes me straight into my TP6 like it should.  Re-installed the unmanaged package then retry renaming Case to Maintenance Request... and voila!  +500 points!
Lee HazlettLee Hazlett
I found that mine was pointing to the wrong playground. Even though the dropdown box had my new playground selected. When I hit refresh it was on a previous playground. I then changed the selection to my new playground and it went through. Hope this helps.

Just another note, it really helps to look at the output logs after hitting the "check challenge". It pretty much tells you what the challenge is trying to do so you can pinpoint how to fix.
Vedant ChouguleVedant Chougule
This is beacause you did not assign HowWeRoll page layout to all profiles
For this go to Object - Maintenance Request - Maintenance Request page layouts - Edit Assignments - and set 'Case (HowWeRoll) Layout' to all profiles and do the same for Equipment.

Hope it will help you !!
Ramu goswami 1Ramu goswami 1
there is no option when you go to edit assignment there is only one option maintenance request.
Vedant ChouguleVedant Chougule
Please follow the below steps-
1.In object manager select ' Maintenance Request'

User-added image

2.Then select 'Maintance Request Page Layouts'

User-added image

3.Then select 'Page Layout Assignment'

User-added image

4.Then select 'Edit Assignments'

User-added image

5. Now select all profiles present on screen and change 'Page Layout To Use'  to 'Case (HowWeRoll) Layout' and  Save it.

User-added image

And do the same for the  'Equipment' object (change 'Page Layout To Use'  to 'Product (HowWeRoll) Layout')
 

Hope it will help you !!
Nandan S 2Nandan S 2
Hi All, 

I am facing this error after doing all the steps, could anyone help me on this!.


Not Able to complete Apex Superbadge



Helper Class: 

public with sharing class MaintenanceRequestHelper {
    public static void updateWorkOrders(List<Case> caseList) {
        List<case> newCases = new List<Case>();
        Map<String,Integer> result=getDueDate(caseList);
        list<Equipment_Maintenance_Item__c> itemsListToinsert= new list<Equipment_Maintenance_Item__c>();//holds extracted
        //Equipment_Maintenance_Item__c records from Old case Ids and then based on new Case.Old Case id adds the records to new case
      Map<String,list<Equipment_Maintenance_Item__c>> resultItmes=getMaintainanceItems(caseList); //function to get all
        for(Case c : caseList){
            if(c.status=='closed')
                if(c.type=='Repair' || c.type=='Routine Maintenance'){
                    Case newCase = new Case();
                    newCase.Status='New';
                    newCase.Origin='web';
                    newCase.Type='Routine Maintenance';
                    newCase.Subject='Routine Maintenance of Vehicle';
                    newCase.AccountId=c.AccountId;
                    newCase.ContactId=c.ContactId;
                    newCase.Vehicle__c=c.Vehicle__c;
                    newCase.Product__c=c.Product__c;
                    newCase.Date_Reported__c=Date.today();
                    newcase.Old_Case_Id__c=c.Id;
                    if(result.get(c.Id)!=null)
                     newCase.Date_Due__c=Date.today()+result.get(c.Id);
                    else
                        newCase.Date_Due__c=Date.today();
                    newCases.add(newCase);
                }
        }        
       if(newCases.size()>0)
       {      
           insert newCases;
           
           for(Case c : newCases){
             List<Equipment_Maintenance_Item__c> temp =  resultItmes.get(c.Old_Case_Id__c);
               if(temp !=null){
                    for(Equipment_Maintenance_Item__c row:temp){
                    Equipment_Maintenance_Item__c newitem = new Equipment_Maintenance_Item__c();
                        newitem.Equipment__c=row.Equipment__c;
                        newitem.Maintenance_Request__c= c.Id;
                        newitem.Quantity__c= row.Quantity__c;  
                        itemsListToinsert.add(newitem);
                       
                    }
               }
               
           }
           
           
       }
       
       if(itemsListToinsert.size()>0)
           insert itemsListToinsert;
    }
    //
    public static  Map<String,Integer> getDueDate(List<case> CaseIDs){      
       Map<String,Integer> result = new Map<String,Integer>();
        Map<Id, case> caseKeys = new Map<Id, case> (CaseIDs);        
       List<AggregateResult> wpc=[select Maintenance_Request__r.ID cID,min(Equipment__r.Maintenance_Cycle__c)cycle
                      from Equipment_Maintenance_Item__c where  Maintenance_Request__r.ID in :caseKeys.keySet() and Equipment__r.Maintenance_Cycle__c != null group by             Maintenance_Request__r.ID ];
        for(AggregateResult res :wpc){
            Integer addDays=0;
            if(res.get('cycle')!=null)
                addDays+=Integer.valueOf(res.get('cycle'));
            result.put((String)res.get('cID'),addDays);
        }
        return result;
}
    //Method starts from here
   
     public static Map<String,list<Equipment_Maintenance_Item__c>> getMaintainanceItems(List<case> CaseIDs){      
     
       Map<String,list<Equipment_Maintenance_Item__c>> mapofMaintainanceItems = new Map<String,list<Equipment_Maintenance_Item__c>>();
        Map<Id, case> caseKeys = new Map<Id, case> (CaseIDs); // gets all updated closed case Id and save as key set to use it to search all EMT records in one go instead of using for loop to go case by case .      
       list<Equipment_Maintenance_Item__c> lstrec = new  list<Equipment_Maintenance_Item__c>([select id ,Maintenance_Request__c,Equipment__c,Quantity__c  
                      from Equipment_Maintenance_Item__c where  Maintenance_Request__r.ID in :caseKeys.keySet() ]);
       
         for(Equipment_Maintenance_Item__c row:lstrec){
              /* commented if part as its not letting do 100% coverage . Very weired way to see if code is working or not
                if (mapofMaintainanceItems.containsKey(row.Maintenance_Request__c)) {
                    // as Map holds pair values and here is Case Id, list of EMT records , above if checks if already there is a record with Case Id
                    // If its there it comes to this section else goes to else where it creates a new list of EMT records for that case Id
                    // structure is like this - mapofMaintainanceItems = {CaseId1, {EMTRow 1 Values, EMT Row 2 Values ... }
                    //                                                         CaseID2, {EMTRow1...}CaseId3,{Emt1,....}}
                    List<Equipment_Maintenance_Item__c> temp = mapofMaintainanceItems.get(row.Maintenance_Request__c);
                        temp.add(row);
                    mapofMaintainanceItems.put(row.Maintenance_Request__c, temp);
                }
                else{*/
                    mapofMaintainanceItems.put(row.Maintenance_Request__c, new List<Equipment_Maintenance_Item__c> { row });
                //}    
                       
         }
         
        return mapofMaintainanceItems;
}
   
   
}




Trigger Code:


trigger MaintenanceRequest on Case (before update, after update) {
    // ToDo: Call MaintenanceRequestHelper.updateWorkOrders
   
if(Trigger.isAfter)
                 MaintenanceRequestHelper.updateWorkOrders(Trigger.New);
}
Rafael Franco Moreno 10Rafael Franco Moreno 10
for me, I had the wrong org, when I choose the org for that badge the error gone
Mike HarriesMike Harries
The reason behind it is when you click on the check challenge the system will validate the org linked to the challenge just behind the quiz section. if not linked it will validate in a new org which don't have anything related to your work. Link your correct package installed and coded org before checking challenge.




User-added image
Mahesh PalanMahesh Palan
Here is how i solved the same issue 

a)Clicked on Reset in the Cases row in (Rename Tabs page ) -->To start from scratch
b)Clicked on Edit

User-added image

d)Rename it to Maintainence Requests 

User-added image

e)Click on Next .This IS VERY IMPORTANT STEP .I mean i used to click save before when it did not worked 

f)In Next Step you willl see all columns with name case also get renamed

User-added image

g)click save