insert new record using lightning component -- w3web.net

How to Insert New Record with Radio Button, Checkbox, Datepicker, Picklist, Long Text Area Using Lightning Component and Apex Controller | how to submit form Value in lightning component in Salesforce

492 views

Hey guys, today in this post we are going to learn about how to Insert New Record with Radio Button, Checkbox, Date picker, Picklist, Long Text Area Using Lightning Component and Apex Controller.

We used the files in this example:-

submitFormCustomObjApp.app Lightning Application It is used for call the component to preview on browser.

submitFormCustomObjCmp.cmp

Lightning Component It is used for create a custom form on lightning component .

submitFormCustomObjCmpController.js

JavaScript Controller File It is used for click function for insert a form input value in database.
submitFormCustomObjCmpHelper.js JavaScript Controller HelperFile It is used for fatch the picklist value from server of State and City
submitFormCustomObjCmp.css Component Style CSS It is used for create custom Style CSS for alignment the form input field and section.
submitFormCustomObjCmpCtrl.apxc Apex Class Controller It is used for insert input value into database server

Live Demo

insert new record using lightning component -- w3web.net

 

Other related post that would you like to learn in Salesforce

 

Step 1:- Create Lightning Application : submitFormCustomObjApp.app

From Developer Console >> File >> New >> Lightning Application

submitFormCustomObjApp.app [Component Application File]

Step 2:- Create Lightning Component : submitFormCustomObjCmp.cmp

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

submitFormCustomObjCmp.cmp [Lightning Component File]

Step 3:- Create Lightning Component : submitFormCustomObjCmpController.js

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

submitFormCustomObjCmpController.js [JavaScript Controller]

Step 4:- Create Lightning Component : submitFormCustomObjCmpHelper.js

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

submitFormCustomObjCmpHelper.js [JavaScript Helper File]

JavaScript helper function in Salesforce by w3web.net

Step 5:- Create Lightning Component Style: submitFormCustomObjCmp.css

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

submitFormCustomObjCmp.css [Style CSS]

Step 6:- Create Apex Class : submitFormCustomObjCmpCtrl

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

studentInfoCtrl.apxc [Apex Class Controller]

 

 

Further post that would you like to learn in Salesforce

 
 

 

 

FAQ (Frequently Asked Questions)

How do you display record details with lightning component?

To display a record using lightning:recordForm , provide the record ID and the object API name. Additionally, provide fields using either the fields or layoutType attribute. You can display a record in two modes using the mode attribute. Loads the form using output fields with inline editing enabled.

How do you add a new record with lightning component?

To create a record using force:recordData , leave out the recordId attribute. Load a record template by calling the getNewRecord function on force:recordData . Finally, apply values to the new record, and save the record by calling the saveRecord function on force:recordData

How do you show radio buttons horizontally in lightning?

Use label-inline to horizontally align the label and radio group. Use label-stacked to place the label above the radio group.

Related Topics | You May Also Like

  • Your reaction of the article ▾
 

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

7 thoughts on “How to Insert New Record with Radio Button, Checkbox, Datepicker, Picklist, Long Text Area Using Lightning Component and Apex Controller | how to submit form Value in lightning component in Salesforce”

  1. You’re a beautiful inspiration. It really helps me in any situation. Where I stuck. Many of my friends told me to comment there post but I stuck what I should comment. Finally I got your post it always help me. Thanks for the lovely post.

    Reply

Leave a Comment