How to import records using Lighting Web Component?

Lightning Web Component allows you to import records in your Salesforce org. All you need to do is upload your CSV file, map your fields, and save and run your tasks. All of this is achievable with the data loader.

But how does someone import the records if they aren’t technically sound

Here’s how!

STEP 1: Upload data on an account object.

Lighting Web Component, import record in salesforce

STEP 2: Select the CSV File of account records and then Upload.

Lighting Web Component, import record in salesforce

STEP 3: Create ReadCSVFileInLWC.html

Step 4: CSV File LWC.Js-meta.xml

Step 5: ReadCSVFileInLWC.js

Step 6: Apex Class(CSVFileReadLWCCntrl)

Conclusion:

This simple code can help anyone with and without technical knowledge to upload records in thousands to the Salesforce Org. Do try this out and share your experience with us.

Happy Learning! 🙂

Our Location worldwide
India
3rd Floor, A-10, Pegasus Tower, Sector 68, Noida, Uttar Pradesh 201301 +91-1203117884
SR Tower 2nd Floor Hydel Gate Haldwani Uttarakhand 263126 +91-5946359996
USA
333 West Brown Deer Road Unit G – 366 Milwaukee WI, USA 53217 +1(262) 310-7818
UK
7 Bell Yard, London, WC2A 2JR +44 20 3239 9428
Canada
HIC Global Solutions INC
43 Lafferty Lane, Richmond Hill, L4C 3N8, CA +1(262) 310-7818