function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Luis Florez 4Luis Florez 4 

KeyField attribute is missing on Project

Hello,

I was going through a Project module and I wasn't getting the desired results, and then I've found out that in the code displayed in the article it was missing a piece:
https://www.screencast.com/t/F4D2I8mR54B

On this page: https://trailhead.salesforce.com/projects/quickstart-lightning-components/steps/quickstart-lightning-components5

 
Raj VakatiRaj Vakati
 Yes .keyField is missing and its required field. Associates each row with a unique ID.
It should look like below 
 
 
<lightning:datatable data="{! v.Contacts }"  keyField="id"  columns="{! v.Columns }" hideCheckboxColumn="true"/>