• Carol Lowe 3
  • NEWBIE
  • 0 Points
  • Member since 2019

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 2
    Replies
Hi,

Trailhead: https://trailhead.salesforce.com/projects/quickstart-lightning-components/steps/quickstart-lightning-components3

Problem saving MyContactList.cmp.
Field_Integrity_Exception: Failed to save MyContactList.cmp: Invalid definition for null:MyContactListComponent: null: Source

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

MCL.cmp:
<aura:component controller="MyContactListComponent" 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>

User-added image

Anyone any idea or suggestion to help?

Thank you, regards, albert