I am doing the following module in Trailhead- Build a Conference Management App > Create a Lightning component
I am getting the error - API Name undefined is invalid, did you mean "Speaker__c?"
I have tried pasting the exact codes but it still failed -
SpeakerForm.cmp
<aura:component implements="flexipage:availableForRecordHome,force:appHostable,lightning:actionOverride,force:hasRecordId">
<aura:attribute name="speaker" type="Speaker__c" />
<aura:attribute name="recordId" type="String" />
<div class="slds-p-bottom_large slds-p-left_large" style="width:600px">
<lightning:recordEditForm aura:id="recordViewForm"
recordId="{!v.recordId}"
recordTypeId="{!v.speaker}"
objectApiName="Speaker__c"
onsuccess="{!c.onSuccess}">
<lightning:messages />
<lightning:inputField fieldName="First_Name__c" />
<lightning:inputField fieldName="Last_Name__c" />
<lightning:inputField fieldName="Email__c" />
<lightning:inputField fieldName="Bio__c" />
<lightning:button aura:id="submit" type="submit" label="Update Speaker" class="slds-m-top_medium" />
</lightning:recordEditForm>
</div>
SpeakerFormController.js
({
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();
}})
I have passed the challenge but the form just does not work (it does not even load).
Please help me understand what's wrong.