Ask Search:
Kristi NiblockKristi Niblock 

Build a Conference Management App - Create an Aura Component

Hi All,

I am working through the Build a Conference Management App module and I'm stuck on the Create an Aura Component unit. 

Here is the error I'm getting when I attempt to check the challenge:
The JavaScript controller markup for the 'SpeakerForm' component isn't correct. Make sure you copied and pasted the code correctly.

My form appears to work properly (the record does save the changes), but I do receive this error after saving:
This page has an error. You might just need to refresh it. First, would you give us some details? (We're reporting this as error ID: -1511790141)

I've already tried the following:
- Start the entire module over with a newly created Trailhead Playground
- Compare (in scrutinizingly painful detail) the code in Trailhead vs the code in my dev console
- Make sure the quotes didn't somehow copy over as curly quotes
- Turn it off and on again, spin in 3 circles, offer my only Salesforce plushy as a sacrifice

Any insight given will be much appreciated. :)
Best Answer chosen by Kristi Niblock
Jeffrey WongJeffrey Wong
Hi Kristi,

I was just working on this and received the same error too. It really confused me as well but after some googling I was able to find a solution here: https://developer.salesforce.com/docs/component-library/bundle/force:navigateToObjectHome/documentation

All Answers

Jeffrey WongJeffrey Wong
Hi Kristi,

I was just working on this and received the same error too. It really confused me as well but after some googling I was able to find a solution here: https://developer.salesforce.com/docs/component-library/bundle/force:navigateToObjectHome/documentation
This was selected as the best answer
Kristi NiblockKristi Niblock
Hi Jeffrey,

Thank you SO much! That one was driving me crazy. Your solution worked perfectly. I appreciate the help!
Mihail CraciunMihail Craciun
({
    onSuccess: function(component,event,helper){
        //Show Success message on upsertion of record
        var resultToast = $A.get("e.force:showToast");
        resultToast.setParams({
                            "title": "Success!",
                            "message": "Record Saved Successfully"
                        });
        resultToast.fire();
        //Navigate to sObject home page
        var homeEvent = $A.get("e.force:navigateToObjectHome");
    	homeEvent.setParams({
        	"scope": "Speaker__c"
    	});
    	homeEvent.fire();
        
    }
})

Just replace the
 var homeEvent = $A.get("standard__objectPage");
to
​​​​​​​ var homeEvent = $A.get("e.force:navigateToObjectHome");