function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Vaibhab ShahVaibhab Shah 

Dynamically retrieve picklist values

Hi,
How to retrieve picklist values of a field dynamically and display it in Lightning Aura Component?

Rgds,
Vai.
LuisMRochaLuisMRocha
I would do it like this, create an apex class to retrieve the picklist values, (You can't use SelectOption because it's not aura enabled so using a basic map, you could also create a wrapper class), create a javascript controller to put the data in the right attribute. 
public class RetrievePicklistValuesController {
    
    @AuraEnabled
    public static List<Map<String,String>> RetrievePicklistValues(){
        
        List<Map<String,String>> IndustriesPicklistValues = new List<Map<String,String>>();
        
        Schema.DescribeFieldResult fieldResult = Account.Industry.getDescribe();
        
        List<Schema.PicklistEntry> picklistEntries = fieldResult.getPicklistValues();
        
        for( Schema.PicklistEntry entry : picklistEntries){
            IndustriesPicklistValues.add(new Map<String, String>{'value' => entry.getValue(), 'label' => entry.getLabel()});
        }       
        return IndustriesPicklistValues;
    }
}
<aura:component implements="forceCommunity:availableForAllPageTypes" access="global" controller="RetrievePicklistValuesController">
<aura:attribute name="listOptions" type="List" default="world"/>

    <aura:handler name="init" value="{!this}" action="{!c.doInit}"/>
    
    <aura:iteration items="{!v.listOptions}" var="item">
        <ul>
            <li>{!item.label} - {!item.value}</li>
        </ul>
    </aura:iteration>
</aura:component>
({
    doInit : function(cmp) {
        var action = cmp.get("c.RetrievePicklistValues");
        
        action.setCallback(this, function(response) {
            var state = response.getState();
            if (state === "SUCCESS") {
                cmp.set('v.listOptions', response.getReturnValue() );
            }
        });
        $A.enqueueAction(action);
    }
})

Source (https://luismrochaluismrocha.weebly.com/salesforce-blog
madhav sharma 1madhav sharma 1

Electronic devices are essential in every home today and our lives revolve around them as they add luxury and comfort to our daily tasks. There are many electronic devices that we have installed at home or in the office and that need repairing including mobile phones, TV, iPad, iPhones, Xbox, Apple Watch, etc. to carry out many of our daily activities with ease. The industries that make electronic equipment are getting more expensive every day, and buying new equipment when something goes wrong with the old is not always possible. Just to cover this cost to consumers, the number of electronics repair service providers is growing. So, instead of throwing away this damaged or broken electronic device, you can now get it repaired with services that will allow it to perform at high efficiency and make it like new again.
Today everything around us seems to be powered by electricity. The average household has 85% of electronic machines, and the average person spends 90% of their day on these machines. No matter how carefully you use these devices, wear and tear is inevitable and regular maintenance is required to fix or repair anything that is broken. To address these issues, there is a growing number of suppliers offering electronics repair services today. They also offer home service, which means you won't have to carry broken devices with you to their store, but instead will have a specialist come to your home or office to fix the same.
There are different suppliers that offer different types of electronics repair services.
 
  • Consumer Electronics Repair Services: These workshops specialize in repairing gadgets or home appliances that are used primarily in the home or office. These include the most common devices we use for entertainment, in the kitchen, and computers and laptops used for work.
 
  • Specialized Repair Workshops: These are workshops that repair a specific type of device. For example, TV repair shops, kitchen appliances repair shops and the like.
 
  • Industrial Electronics Repair Services: These suppliers specialize in the repair of equipment that is used in manufacturing, industry and factories. The work area also includes hospitals, banks, commercial organizations, businesses, and more that require massive renovation. Repairing services in Montreal, Canada include power supplies, printed circuit boards, monitors, video recording systems, telecommunications systems, and others specific to various industries.

The many benefits you have access to include electronics repair services.
 
  • An honest repair that will help you regain the lost functionality of any electronic gadget and device.
 
  • A quality and reliable service that will help you deliver repaired components or devices right to your doorstep in the shortest possible time.
 
  • Overall, the services are fast, reliable and cost effective, loaded with precision

Finding suppliers who can offer electronics repair services is easy
Today sellers use technologically safe equipment and tools when performing repair work. The process is carried out using equipment that has the best IC, resistance, frequency, capacitance, and voltage that is actually needed. Finding suppliers that specialize in repair services in Montreal, Canada or improving all types of devices and gadgets, broken or faulty, isn't that hard. Whether you're looking for a service provider who can repair, install, or improve small PCBs or large industrial devices, you can do it all. Additionally, when you are looking for someone who can repair electrochemical equipment, you can find suppliers that use the functional test methods that are used in their manufacture.

Get the best electronics repair services with Golden Teck
Golden Teck (https://goldenteck.com/" style="color:#0563c1; text-decoration:underline) is a company that solves people's daily technical problems and that provides 24/7 technical support. We offer a super personalized service, where the client can request its repair remotely and we offer monthly solutions. The company is leading the way with better service, more reliable solutions, cost-effective results in Montreal, Canada.