dynamically fetch picklist values in salesforce lwc -- w3web.net

Retrieve picklist values dynamically of Opportunity Object without apex class using ‘uiObjectInfoApi’ property and displaying the selected pick-list value in Salesforce Lightning Component — LWC | How to fetch picklist value without apex method and display selected pick-list value in lwc

Hey guys, today in this post we are going to learn about how to Retrieve picklist values dynamically of Opportunity Object fields of StageName without apex class using ‘uiObjectInfoApi’ property and displaying the selected pick-list value in Salesforce Lightning Component — LWC.

Here we Use the wire adaptor to get the picklist values for a specified field of Opportunity./p>

Picklist values are scoped to a record type. For dependent picklists, getPicklistValues returns data for controlling fields and map to the picklist.

To retrieve all picklists of a record type, use getPicklistValuesByRecordType. To know more, click here

Files we used in this post example

picklistValueLWC.html Lightning Web Component HTML Template HTML file for used to write HTML element for display the picklist of opportunity stage name.
picklistValueLWC.js LWC JavaScript File It is holding @Wire method function that is fetching the picklist value from database using uiObjectInfoApi.
picklistValueLWC.js-meta.xml XML Meta File It is used to where this lightning web component file you want to display as like lightning__AppPage, lightning__RecordPage, lightning__HomePage..

Final Output

fetch picklist values based on record type in salesforce lwc -- w3web.net

Other related post that would you like to learn in LWC

  • Find the below steps

Create Lightning Web Component HTML

Step 1:- Create Lightning Web Component HTML ➡ picklistValueLWC.html

SFDX:Lightning Web Component ➡ New ➡ picklistValueLWC.html

picklistValueLWC.html [Lightning Web Component HTML]

Create Lightning Web Component Javascript

Step 2:- Create Lightning Web Component Javascript ➡ picklistValueLWC.js

SFDX:Lightning Web Component ➡ New ➡ picklistValueLWC.js

picklistValueLWC.js [LWC JavaScript File]

Create Lightning Web Component Meta XML

Step 3:- Create Lightning Web Component Meta XML ➡ picklistValueLWC.js-meta.xml

SFDX:Lightning Web Component ➡ New >> picklistValueLWC.js-meta.xml

picklistValueLWC.js-meta.xml [LWC Meta Data XML]

fetch picklist values based on record type in salesforce lwc -- w3web.net

Further post that would you like to learn in LWC

To Find Some Important Additional Information
If you think you and your family members also like to earn money in additional time, then go this link. In this site, you can earn money for the lifetime at low effort. To Earn Unlimited Everyday With This Trick, Sign Up Free and Get Magic.. Get Started for Free

Check Out Youtube:- Earn Unlimited Everyday With This Trick:- Click Here

Related Topics | You May Also Like

Hi, This is Vijay behind the admin and founder of w3web.net. I am a senior software developer and working in MNC company from more than 8 years. I am great fan of technology, configuration, customization & development. Apart of this, I love to write about Blogging in spare time, Working on Mobile & Web application development, Salesforce lightning, Salesforce LWC and Salesforce Integration development in full time.

Leave a Comment