Wrapper class in salesforce by w3web.net

How to wrapper class retrieve all the values in Salesforce Lightning Component | how to pass wrapper class instance to fetch record from custom object in Salesforce lightning component

430 views

Hey guys, In this post we are going to learn about that how to Wrapper class Retrieve all the Values in Salesforce lightning component.

In this example we will fetch all the values from Custom sObject by help of wrapper apex class in lightning component.

Files we used in this post example:-

File Name File Type Description
wrapperClassCustomObjApp.app Lightning Component Application It is used for Call the component to preview the output on browser.
wrapperClassCustomObjCmp.cmp Lightning Component Application It is used to user interface display on the client side.
wrapperClassCustomObjCmpConroller.js JavaScript Controller File It is used for client side javascript function.
wrapperClassCustomObjCmpConrollerHelper.js JavaScript Helper File Helper called in the Javascript controller Init function.
wrapperCustomObjCtrCmp.apxc Apex Class Controller For retrieve all the record from database server

Custom Object:- NewStudent__c

Custom Object Fields:-

Id,

Name,

Email__c,

Address__c

 

Custom Object and their fields Custom object like database and custom fields are column of data table.

 

Other related post that would you like to learn in Salesforce

 

Step 1:- Create Lightning Application : wrapperClassCustomObjApp.app

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

wrapperClassCustomObjApp.app [Component Application File]

Step 2:- Create Lightning Component : wrapperClassCustomObjCmp.cmp

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

wrapperClassCustomObjCmp.cmp [Lightning Component File]

Step 3:- Create Lightning Component : wrapperClassCustomObjCmpConroller.js

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

wrapperClassCustomObjCmpConroller.js [JavaScript Controller]

Step 4:- Create Lightning Component : wrapperClassCustomObjCmpConrollerHelper.js

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

wrapperClassCustomObjCmpConrollerHelper.js [JavaScript Helper File]

Helper Function in salesforce lightning by w3web.net

Step 5:- Create Lightning Application : wrapperCustomObjCtrCmp.apxc

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

wrapperCustomObjCtrCmp.apxc [Apex Class Controller]

 

Further post that would you like to learn in Salesforce

 

 

FAQ (Frequently Asked Questions)

What is a wrapper class apex?

A wrapper or container class is a class, a data structure that contains different objects or collections of objects as its members. A wrapper class is a custom object defined by a programmer wherein he defines the wrapper class properties.

Why do we use wrapper class in Apex?

A wrapper class is used mainly to wrap data collected from the present objects to a new object. A sObject is defined as a distinct type that doesn't include a database or any relevant field; it doesn't have any API page but is definitely a valid object.

What is wrapper class explain?

A Wrapper class is a class whose object wraps or contains primitive data types. When we create an object to a wrapper class, it contains a field and in this field, we can store primitive data types. In other words, we can wrap a primitive value into a wrapper class object.

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

5 thoughts on “How to wrapper class retrieve all the values in Salesforce Lightning Component | how to pass wrapper class instance to fetch record from custom object in Salesforce lightning component”

Leave a Comment