Insert New Record in Custom Object in lwc -- w3web.net

Insert New Record in Custom Object and Navigate to the Record Detail Page Using Apex class method in Lightning Web Component — LWC

Hey guys, today in this post we are going to learn about How to Insert New Record in Custom Object and Navigate to the Record on Detail Page Using Apex class method in Lightning Web Component — LWC.

Files we used in this post example:-

insertRecordCustomObjectLwc.html Lightning Web Component HTML Template HTML file for used to write HTML element for user interface..
insertRecordCustomObjectLwc.js Lightning Web Component JavaScript It is holding submitAction function that is geting the value from input field and save into the database.
insertRecordCustomObjectLwc.js-meta.xml XML Meta File It is used for where this lightning web component you want to exposed
lwcAppExampleApex.cls Apex Controller It is used for call apex method imperatively in LWC Javascript file.

Live Demo

create record for custom object using lwc -- w3web.net

Other related post that would you like to learn in LWC

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

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

insertRecordCustomObjectLwc.html [Lightning Web Component HTML]

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

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

insertRecordCustomObjectLwc.js [LWC JavaScript File]

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

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

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

Step 4:- Create Apex Controller : lwcAppExampleApex.cls

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

lwcAppExampleApex.cls [Apex Class]

Insert New Record in Custom Object in lwc -- w3web.net

Further post that would you like to learn in LWC

7 thoughts on “Insert New Record in Custom Object and Navigate to the Record Detail Page Using Apex class method in Lightning Web Component — LWC”

  1. Hi. your post is so nice and I really loved reading your post.
    It was very well authored and easy to understand. Great Thanks for sharing awesome info. I really love to read your blog.

    Reply

Leave a Comment