FavoriteAthira Venugopal asked in #Lightning ExperienceSep 17, 2020, 5:43 AMLightning:datatable doesn't displays data for custom objectI have used lightning data table for my custom object, no data got displayed in the tablehtml<template> <h2> Project Datatable</h2> <template if:true={accList}> <lightning-datatable data={accList} columns={columns} key-field="Id"> </lightning-datatable> </template> <template if:true={error}> {error} </template></template>JSimport { LightningElement ,api, wire, track} from 'lwc';import getAccountList from '@salesforce/apex/PriceFetch.getAccountList';export default class PriceScreen extends LightningElement { @track columns = [{ api: 'BuildingNo__c', label: 'BuildingNo', fieldName: 'BuildingNo', type: 'text', sortable: true }, { api:'Location__c', label: 'Location', fieldName: 'Location', type: 'text', sortable: true } ]; @track error; @track accList ; @wire(getAccountList) wiredAccounts({ error, data }) { if (data) { this.accList = data; } else if (error) { this.error = error; } }}PriceFetch.cls (Apex class)public with sharing class PriceFetch { @AuraEnabled(cacheable=true) public static List<Project__c> getAccountList() { return [SELECT Id,BuildingNo__c, Location__c FROM Project__c]; }} An empty table is the output, Please helpmeShow More2 answersSortSort by DateSort by Most HelpfulSort by DateLoad more comments...Nav SinghSep 16, 2022, 10:46 AMThanks, ANUTEJ your code is working fine.Add a commentWrite an answer...BoldItalicUnderlineStrikethroughBulleted ListNumbered ListAdd linkCode blockInsert imageAttach filesLink URLCancelSave0/9000Reply