You need to sign in to do that
Don't have an account?
Justin Bresee
Why am I getting this error: This page has an error. You might just need to refresh it. afterRender threw an error in 'c:siteExaminers_v2' [Cannot read property 'Name' of undefined] Failing descriptor: {c:siteExaminers}
I am trying to create a lightning component that pulls some contacts from my salesforce.
Here is the HTML
Here is the javascript
and the error I am getting is: This page has an error. You might just need to refresh it. afterRender threw an error in 'c:siteExaminers_v2' [Cannot read property 'Name' of undefined] Failing descriptor: {c:siteExaminers}
Here is the HTML
<template for:each={examiners.data} for:item='examiner'> <tr key={examiner.Id}> <th>{examiner.Name}</th> <th>{examiner.Title}</th> <th>{examiner.Account.Name</th> </tr> </template>
Here is the javascript
import { LightningElement, wire } from 'lwc'; import getSiteExaminers from '@salesforce/apex/Dynamic_Pages.getSiteExaminers'; export default class SiteExaminers extends LightningElement { @wire(getSiteExaminers) examiners; }
and the error I am getting is: This page has an error. You might just need to refresh it. afterRender threw an error in 'c:siteExaminers_v2' [Cannot read property 'Name' of undefined] Failing descriptor: {c:siteExaminers}
Try below code: