How to Insert a Record of Account Object Using Apex Class in Salesforce Lightning Web Component-LWC

Vijay Kumar
2 min readSep 13, 2020

--

How to Insert a Record of Account Object Using Apex Class in Salesforce Lightning Web Component-LWC

Hey guys, today in this post we are going to learn about How to Insert a Record of Account Object Using Apex Class in Salesforce Lightning Web Component (LWC)

Files we used in this post example:-

insertAccountLwc.html

Lightning Web Component HTML

It is Templae HTML file where we are used to write HTML element for build user interface.

insertAccountLwc.js

Lightning Web Component JavaScript

It is hold function and business logi c.

insertAccountLwc.js-meta.xml

XML Meta

It is used forwhere this lightning web component should be exposed.

lwcApexController.cls

Apex Controller File

It is used for insert input value into database server.

Live Demo

Other post that would you like to learn

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

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

insertAccountLwc.html [Lightning Web Component HTML]

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

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

insertAccountLwc.js [JavaScript Controller]

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

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

insertAccountLwc.js [LWC Meta Data XML]

Lightning Web Component Meta XML

Step 4:- Create Lightning Web Component : lwcApexController.cls

SFDX:Create Apex Class >> New >> lwcApexController.cls

Originally published at https://www.w3web.net on September 13, 2020.

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

No responses yet

Write a response