This wire adapter fetches picklist values for a specific field on an object, allowing you to dynamically populate dropdowns and other selection elements.
import { LightningElement, wire } from 'lwc';
import { getPicklistValues } from 'lightning/uiObjectInfoApi';
import INDUSTRY_FIELD from '@salesforce/schema/Account.Industry';
export default class IndustryPicklist extends LightningElement {
@wire(getPicklistValues, { fieldApiName: INDUSTRY_FIELD })
picklistValues;
get options() {
return this.picklistValues.data ? this.picklistValues.data.values : [];
}
}
Use this for picklist with record type
import ACCOUNT_OBJ from ‘@salesforce/schema/Account’;
@api recordTypeId;
@wire(getPicklistValuesByRecordType, { objectApiName: ACCOUNT_OBJ, recordTypeId: ‘$recordTypeId’ })
html file –
<template> <lightning-combobox options={options} placeholder="Select an Industry"></lightning-combobox> </template>

He is a technology evangelist, Salesforce trainer, blogger, and working as a Salesforce Technical Lead. After working in Java based project implementation, he jumped to the Salesforce system on a whim and never looked back. He fell in love with Salesforce’s flexibility, scalability, and power. He expanded his knowledge of the platform and became a Certified App Builder, Administrator, Platform Developer I, II, SalesCloud Consultant, total 11 x certified while leading the Salesforce implementation and technology needs. He has worked in a wide variety of applications/services like desktop, web and mobile applications.