can we edit records in lightning components --

How to you make Edit/Save records of Account on edit button click as custom functionality using apex class controller in lightning component Salesforce | How to update/edit Account records uses of apex class in lightning component Salesforce


Hey guys, today in this post we are going to learn about How to you make Edit/Save records of Account on edit button click as custom functionality in lightning component Salesforce.

To edit a record using lightning:recordForm, provide the record ID and object API name. When you provide a record ID, view mode is the default mode of this component, which displays fields with edit icons. If you click an edit icon, all fields in the form become editable. To know more details, Click Here →


Files we used to create Edit/Save Functionality in aura:component →

editRecordCmp.cmp Lightning Component It is used to create a edit/save records form in lightning component
editRecordCmpController.js JavaScript Controller It is hold Javascript Edit/Save functionality in lightning component.
editRecordCtrl.apxc Apex Class Controller It is used for get SOQL query to retrieve data from Apex Method Lightning Application It is used to call the component and preview on browser.



Final Output →

how to edit update records in lightning --


Other related post that would you like to learn in Salesforce


  • Find the below steps ▾


Create Lightning Component

Step 1:- Create Lightning Component : editRecordCmp.cmp

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

editRecordCmp.cmp [Lightning Component File]


Create JavaScript Controller

Step 2:- Create Lightning Component : editRecordCmpController.js

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

editRecordCmpController.js [JavaScript Controller]


Create Apex Class Controller

Step 3:- Create Apex Class : editRecordCtrl.apxc

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

editRecordCtrl.apxc [Apex Class Controller]


Create Lightning Application

Step 4:- Create Lightning Application :

From Developer Console >> File >> New >> Lightning Application [Component Application File]

how to edit update records in lightning --

Further post that would you like to learn in Salesforce



FAQ (Frequently Asked Questions)

How do you make a field editable in lightning component?

To specify editable fields, use lightning-input-field components inside lightning-record-edit-form component. See the Editing a Record section. To display record fields as read-only in lightning-record-edit-form , use lightning-output-field components to specify those fields.

Can we edit lightning components in production?

Lightning Components can be changed in Production, however it is not recommended because it would cause discrepancies between any and all Sandboxes that were created before the change on Production.

How do I edit a custom lightning component?

Custom Lightning components configured for Experience Builder sites behave just like standard template components. Drag the component to the page canvas. To edit its properties, select the component on the page canvas, and then enter changes in the floating component property editor.

Related Topics | You May Also Like

  • Your reaction of the article ▾

Hi, This is Vijay Kumar behind the admin and founder of 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

Leave a Comment