Generic Record Handler Lightning Component

      8 Comments on Generic Record Handler Lightning Component

In this blog, we will develop a generic record handler lightning component, which will be helpful in viewing and editing any record of any object.

This component is developed using very helpful base lightning components,  lightning:datatable and lightning:recordForm. It will be helpful in:

  • Viewing any object in your Salesforce Org.
  • Viewing and editing records of the selected object from the same page. This works for both standard and custom object.

You can replace the datatable used in this example with a paginated datatable, which I have explained in below blogs.

Code Time

GenericRecordHandler.cmp – Lightning Component

GenericRecordHandlerController.js – Controller

GenericRecordHandlerHelper.js – Helper

GenericRecordHandler.apxc – Apex Controller



There are lot of modification can be done in this component as per your use case. Like having a paginated data-table, suppying filter in SOQL instead of fetching 200 records etc. Its totally upto you how you would use this component. Paste your query in the comments.

(Visited 1280 Times)

8 thoughts on “Generic Record Handler Lightning Component

  1. Pratik

    “Generic Record Handler Lightning Component” that you created is really awesome.
    Thank you for all your useful blogs related to lightning.

  2. Hitesh

    Manish – I am new to SF and ligntning (no Java / CCS). I seen you few lightning vdios and they look good but can you please let me who how to start from begining so that I can learh more objectively and also when I can download the classes material to cpmpare

    Hare Krishan

  3. lavanya

    i am new to lightning can i get the example to display the selected record detail page from list of records of any object


Leave a Reply

Your email address will not be published. Required fields are marked *