Posts

GENERATE SOQL QUERY, RETRIVE DATA AND DOWNLOAD DATA AS CSV FILE USING LWC

Image
In this blog we see how to generate soql query, retrive data in datatable and download data as csv file by using lightning web component. For code you can view below or click this link https://bitbucket.org/saikodavali/workspace/snippets/LMMy6E SOQLGenerator.apx public with sharing class ApexPicklist { public ApexPicklist () { } @AuraEnabled ( cacheable = true ) public static list < String > GetObjects () { list < String > AllObjects = new list < String > (); for ( Schema . SObjectType o : Schema . getGlobalDescribe (). values ()) { AllObjects . add ( o . getDescribe (). getName ()); } AllObjects . sort (); return AllObjects ; } @AuraEnabled ( cacheable = true ) public static list < String > GetFields ( String ObjName ) { SObjectType MyFields = Schema . getGlobalDescribe (). get ( ObjName ); Map < String , Schema . SObjectFie...