• Abhishek Trivedi 8
  • NEWBIE
  • 0 Points
  • Member since 2018

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies
while working on the Trailhead Tasks, I am getting the below error, please anyone advise me anyone on this.

Controller code :
public class MyContactListController{
   @AuraEnabled
public static List<Contact> getContacts(Id recordId) {
   return [Select Id, FirstName, LastName, Email, Phone From Contact Where AccountId = :recordId];
}
}
===============================================================================
===============================================================================
component code -

<aura:component controller="MyContactListController" implements="flexipage:availableForRecordHome,force:hasRecordId" access="global" >
<aura:attribute name="recordId" type="Id" />
<aura:attribute name="Account" type="Account" />
<aura:attribute name="Contacts" type="Contact" />
<aura:attribute name="Columns" type="List" />

<force:recordData aura:id="accountRecord"
                  recordId="{!v.recordId}"
                  targetFields="{!v.Account}"
                  layoutType="FULL"
                  />

<lightning:card iconName="standard:contact" title="{! 'Contact List for ' + v.Account.Name}">
            <!-- Contact list goes here -->
     </lightning:card>
</aura:component>
=================================================================================
===================================================================================

 I am getting the below error.

Challenge Not yet complete... here's what's wrong: 
Could not find a component named MyContactList' on the Account record page.