Edit, Delete and Save row Function in Salesforce by w3web.net

Editing row, Saving row and Removing rows Dynamically in Lightning component Salesforce | how to edit/save row dynamically in Salesforce lightning component

1,981 views

Hey guys, In this post we are going to learn about that how to edit row, saving row or removing row dynamically in Salesforce lightning component.

In this example we will customize the same component and achieve to the editing row, saving row and removing rows functionality of dynamically on Custom sObject by help of wrapper apex class and JavaScript Controller in lightning component.

We do not allow to Delete or Edit multiple rows at a same time. First you will need to cancel of the current rows than after you will be able to delete or edit of another rows.

Files we used in this post example:-

wrapperClassCustomObjCmp.cmp Lightning Component It is used for display the Input filed of Name, Address, Email, and Button Icon of Edit, Delete, Cancel and Save on the Table.
wrapperClassCustomObjCmpConroller.js JavaScript Controller File It is used for Edit, Save, Cancel and Delete functionality and this function communicate to server side apex method.
wrapperClassCustomObjCmpHelper.js JavaScript Helper File It is used for refresh the page after delete or Save the record.
wrapperCustomObjCtrCmp.apxc Apex Class Controller It is used for delete and save record from database server

Custom Object:- NewStudent__c

Custom Object Fields:-

Email__c

Address__c

 

Custom Object and their fields Custom object like database and custom fields are columns of data table. We customized the record of both fields by using the apex class method.

Final Output

Editing row, Saving row, Deleting row in lightning component -- w3web.net

 

Other related post that would you like to learn in Salesforce

 

Note:- Custom sObject >> NewStudent__c

You need to change custom sObject name and there fields name with your custom sObject.

Step 1:- Create Lightning Component : wrapperClassCustomObjCmp.cmp

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

wrapperClassCustomObjCmp.cmp [Lightning Component File]

Step 2:- Create Lightning Component : wrapperClassCustomObjCmpConroller.js

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

wrapperClassCustomObjCmpConroller.js [JavaScript Controller]

Step 3:- Create Lightning Component : wrapperClassCustomObjCmpHelper.js

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

wrapperClassCustomObjCmpHelper.js [JavaScript Helper File]

Step 4:- Create Lightning Component : wrapperClassCustomObjCmp.css

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

wrapperClassCustomObjCmp.css [Lightning Component File]

Note:-Static resource zip file

You need to change $Resource.SLDS2016 with your SLDS zip file name (static resource zip file Name)

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

 

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

 

 

FAQ (Frequently Asked Questions)

How do I save a report in Salesforce?

Go into the report that you want to clone. Click Customize. Change the parameters that will make the report unique and Click Save As 'new report filename'.

How do I edit Inlines in Salesforce?

Before your users can start inline editing, the option must be turned on in your Salesforce org. To do this, from setup, go to User Interface and then check the box for 'Enable Inline Editing.' The ability to inline edit is per Salesforce org and cannot be turned on only for specific profiles or users.

What is inline editing?

Inline Editing is a feature that allows users to seamlessly edit and write content visually and directly on-screen without having to toggle between a 'read-only' view and an 'edit' view. In short, users can make quick changes or create content without going to a new page.

Related Topics | You May Also Like

  • Your reaction of the article ▾
 

Hi, 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

10 thoughts on “Editing row, Saving row and Removing rows Dynamically in Lightning component Salesforce | how to edit/save row dynamically in Salesforce lightning component”

Leave a Comment