+ Start a Discussion

Lightning Component Huge Picklist values error

While developing salesforce lightning component, we faced a weird issues. As you know till now we cannot directly use salesforce picklist field as a standard input field in LC, so as a workaround we have to create our own ui:selectlist
Now, while creating same, we added almost 500 picklist values in a single component for country and currency. This stops the component to load. It gives an error of "Event Fired".
Anyone faced something similar? We are using lightning components in Napili Template.
NagendraNagendra (Salesforce Developers) 
Hi Nikhil,

First and foremost sincerely regret delayed reply.

You should create custom field for picklist and add those entries to the picklist. Now create schema to get these picklist values in your lightning component. Here I am creating a schema to get lead status in picklist and calling this method from aura init function
public static List<String> getLeadStatus(){
    List<String> options = new List<String>();
    Schema.DescribeFieldResult fieldResult = lead.status.getDescribe();
    List<Schema.PicklistEntry> ple = fieldResult.getPicklistValues();
    for (Schema.PicklistEntry f: ple) {

    return options;}
Kindly mark this post as solved if the information help's so that it gets removed from the unanswered queue and becomes a proper solution which results in helping others who are really in need of it.

Best Regards,