Example of lightning-datatable inline to edit/save rows of records and refresh lwc component on click button in Salesforce Lightning Web Component — LWC | Inline Edit/Save Field and refresh the component after successful save of standard record page in Salesforce LWC

Vijayk
3 min readNov 13, 2021

Hey guys, today in this post we are going to learn about How to Inline Edit/Save Field and refresh the component after successful save of standard record page in Salesforce LWC.

To display Salesforce data in a table, use the lightning-datatable component. The component supports inline editing, which enables users to update a field value without navigating to the record.

To load a list of records, use the getListUi (Deprecated) wire adapter or use SOQL in an Apex method. To Know more details about inline editing/save field in lwc, click Here.

Files we used to create inline editing/save field in Salesforce LWC →

lwcEditSaveRow.html

LWc HTML File

Template HTML file to edit/save rows inline in Salesforce Lightning Web Component (LWC)

lwcEditSaveRow.js

LWC JavaScript File

It’s hold a javascript on click function to Save and refresh the component after successful in lwc.

lwcEditSaveRow.js-meta.xml

XML Meta File

It is used to where this lightning web component file you want to display as lightning__AppPage, lightning__RecordPage, lightning__HomePage.

lwcEditSaveRowCtrl.cls

Apex Controller

It is used to Fetch the Account records through @wire Decorators from database.

Final Output → To find source code link, click here.

Other related post that would you like to learn in LWC

Create Lightning Web Component HTML →

Step 1:- Create Lightning Web Component : lwcEditSaveRow.html

SFDX:Lightning Web Component >> New >> lwcEditSaveRow.html

lwcEditSaveRow.html [Lightning Web Component HTML]

Create Lightning Web Component JavaScript →

Step 2:- Create Lightning Web Component : lwcEditSaveRow.js

SFDX:Lightning Web Component >> New >> lwcEditSaveRow.js

lwcEditSaveRow.js [LWC JavaScript File]

Create Lightning Web Component Meta XML →

Step 3:- Create Lightning Web Component : lwcEditSaveRow.js-meta.xml

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

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

Lightning Web Component Meta XML

Create Apex Class Controller →

Step 4:- Create Apex Class : lwcEditSaveRowCtrl.cls

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

lwcEditSaveRowCtrl.cls [Apex Class Controller]

Further post that would you like to learn in LWC Flyout is a free, simple way to earn money.

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.. Get Started for Free

Flyout is a free, simple way to earn money by placing sponsored content on your blog

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

Final Output → To find source code link, 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. [Read full bio] | The Sitemap where you can find all published post on w3web.net

Originally published at https://www.w3web.net on November 13, 2021.

--

--