• Kumar Vikash 16
  • NEWBIE
  • 0 Points
  • Member since 2018

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 1
    Replies
I am doing the following module in Trailhead (https://trailhead.salesforce.com/content/learn/projects/salesforce_developer_workshop/creating_lightning_component?trailmix_creator_id=strailhead&trailmix_id=prepare-for-your-salesforce-platform-developer-i-credential) -
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>
</aura:component>

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
 
This Step of the Trailhead "" seams to have a BUG!:

After reviewing the exercise several times, I am getting this error: 
Step not yet complete... here's what's wrong:
There was an unexpected error in your org which is preventing this assessment check from completing: System.QueryException: List has no rows for assignment to SObject

Is any want suffering the same issue?
Any tip?

Thank you very much.
  • September 27, 2018
  • Like
  • 0