1 answer
Hi Vamsi KrishnaGreetings!In Lightning component create a list attribute. Now, In apex, we return a list of String which has all the values of picklist-
If you find your Solution then mark this as the best answer. Thank you!Regards,Suraj Tripathiclass PicklistValue {
@AuraEnabled
public static List<String> fetchPicklistValue() {
Set<String> values = new Set<String>();
for(Account acc : [SELECT valueField__c FROM Account WHERE valueField__c != NULL]) {
values.add(acc.valueField__c);
}
}
return(new List<String>{values});
}