You need to sign in to do that
Don't have an account?
Ruchi Gupta Keshri
how to list more then 50000 record using Data table in lwc
can someone help me with this
how to list more then 50000 record using Data table in lwc please help.
how to list more then 50000 record using Data table in lwc please help.
Pagination only option for this issue, so please follow below url:-
https://www.biswajeetsamal.com/blog/salesforce-lwc-custom-datatable-pagination/
if you need any assistanse, Please let me know!!
Kindly mark my solution as the best answer if it helps you.
Thanks
Mukesh
All Answers
Check below reference which has details on how to bypass 50k limitation.
https://salesforce.stackexchange.com/questions/344154/lwcs-apex-query-returns-more-than-50k-results-how-to-bypass-this-limitation
Please mark as Best Answer if above information was helpful.
Thanks,
any other way? Please Help
public with sharing class AccountData {
@AuraEnabled(cacheable=true)
public static List<AggregateResult> getAccData(){
try {
List<AggregateResult> results =new List<AggregateResult>();
for (List<AggregateResult> agg: [select id,Name,Phone from Account group by id,Name,Phone]){
results.addAll(agg);
}
return results;
} catch (Exception e) {
throw new AuraHandledException(e.getMessage());
}
}
}
import { LightningElement, track, wire } from 'lwc';
import getAccData from '@salesforce/apex/AccountData.getAccData';
export default class NavigateToRecord extends LightningElement {
@track columns = [
{label: 'Name',
fieldName: 'nameUrl', type: 'url',
typeAttributes: {
label: {
fieldName: 'Name'
}
}
},
{ label: 'Id', fieldName: 'Id'},
{label:'Phone', fieldName:'Phone'}
];
@track accountList;
@wire(getAccData)
getAccDataall({data,error}){
if(data){
// this.accountList=data;
let nameUrl;
this.accountList = data.map(row => {
nameUrl = `/${row.Id}`;
return {...row , nameUrl}
})
console.log(data);
}
else if(error){
console.log(error);
}
}
}
<template>
<template if:true={accountList}>
<lightning-datatable
key-field="id"
data={accountList}
columns={columns}
></lightning-datatable>
</template>
</template>
Pagination only option for this issue, so please follow below url:-
https://www.biswajeetsamal.com/blog/salesforce-lwc-custom-datatable-pagination/
if you need any assistanse, Please let me know!!
Kindly mark my solution as the best answer if it helps you.
Thanks
Mukesh