You need to sign in to do that
Don't have an account?
Javeed 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
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
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
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
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
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
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.
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?
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.
1. Launch your org (I did it at incognito browser mode);
2. Paste /packaging/installPackage.apexp?p0=04t36000000i5UM after
Hope it will help
Even i am facing same issue even changing the case object rename to 'Maintainance Request'.
Here below screen shot shows details,
tried number of times but no use. help me out to close this challenge.
Regards,
Kiran
Hope this helps you!
Regards,
Saikumar
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!
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.
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 !!
1.In object manager select ' Maintenance Request'
2.Then select 'Maintance Request Page Layouts'
3.Then select 'Page Layout Assignment'
4.Then select 'Edit Assignments'
5. Now select all profiles present on screen and change 'Page Layout To Use' to 'Case (HowWeRoll) Layout' and Save it.
And do the same for the 'Equipment' object (change 'Page Layout To Use' to 'Product (HowWeRoll) Layout')
Hope it will help you !!
I am facing this error after doing all the steps, could anyone help me on this!.
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);
}
a)Clicked on Reset in the Cases row in (Rename Tabs page ) -->To start from scratch
b)Clicked on Edit
d)Rename it to Maintainence Requests
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
g)click save