Display Record Details with Lightning Component -- w3web.net

How to display dynamically the list of opportunities Using Javascript controller, Helper and Apex Class Method in lightning component Salesforce | How to fetch and display list of Opportunity records using aura:iteration in Lightning Component Salesforce

410 views

Hey guys, today in this post we are going to learn about How to display dynamically the list of opportunities Using Javascript controller, Helper and Apex Class Method in lightning component Salesforce.

Find the Lightning Aura Components Developer Guide, Click Here →

 

Files we used to display opportunity records in lightning component →

displayDataCmp.cmp Lightning Component It is used to display Opportunity records in lightning component
displayDataCmpController.js JavaScript Controller It is hold Javascript doInit function to fetch and display list of records.
displayDataCmpHelper.js JavaScript Helper It is hold Javascript getOppList function to fetch data from apex class method.
displayDataApp.app Lightning Application It is used to call the component and preview on browser.
displayDataCtrl.apxc Apex Class Controller It is used for get SOQL query to retrieve Opportunity records.

 

 

Final Output →

display opportunity records in lightning component -- w3web.net

 

 

Other related post that would you like to learn in Salesforce

 

  • Find the below steps ▾

 

Create Lightning Component →

Step 1:- Create Lightning Component : displayDataCmp.cmp

From Developer Console >> File >> New >> Lightning Component

displayDataCmp.cmp [Lightning Component File]

 

Create JavaScript Controller →

Step 2:- Create Lightning Component : displayDataCmpController.js

From Developer Console >> File >> New >> Lightning Component >> JavaScript Controller

displayDataCmpController.js [JavaScript Controller]

 

Create JavaScript Helper →

Step 3:- Create Lightning Component : displayDataCmpHelper.js

From Developer Console >> File >> New >> Lightning Component >> JavaScript Helper

displayDataCmpHelper.js [JavaScript Helper File]

 

Create Apex Class Controller →

Step 4:- Create Apex Class : displayDataCtrl.apxc

From Developer Console >> File >> New >> Apex Class

displayDataCtrl.apxc [Apex Class Controller]

 

Create Lightning Application →

Step 5:- Create Lightning Application : displayDataApp.app

From Developer Console >> File >> New >> Lightning Application

displayDataApp.app [Component Application File]

 

Further post that would you like to learn in Salesforce

 


 

FAQ (Frequently Asked Questions)

How do you display records in lightning component?

To display a record using lightning:recordForm , provide the record ID and the object API name. Additionally, provide fields using either the fields or layoutType attribute. You can display a record in two modes using the mode attribute. Loads the form using output fields with inline editing enabled.

Can we use PageReference in lightning component?

To navigate in Lightning Experience, Experience Builder sites, or the Salesforce mobile app, define a PageReference object. The pageReference type generates a unique URL format and defines attributes that apply to all pages of that type. The following types are supported.

How do you use Lightning record view?

lightning-record-view-form requires a record ID to display the fields on the record. It doesn't require additional Apex controllers or Lightning Data Service to display record data.

Related Topics | You May Also Like

  • Your reaction of the article ▾
 

Hi, This is Vijay Kumar 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. [Read full bio] | | The Sitemap where you can find all published post on w3web.net

Leave a Comment