insert lookup field value through apex class in salesforce -- w3web.net

Create a record on custom Object to insert record Id of lookup field value with passing parameters to apex class using custom controller in Lightning Component Salesforce | how to insert lookup field in salesforce using apex

270 views

Hey guys, today in this post we are going to learn about how to Create a record on custom Object to insert record Id of lookup field value with passing parameters to apex class using custom controller in Lightning Component Salesforce .

We used the files in this example

feesCmp.cmp Lightning Component It is used for display the Input filed of Student Name, Course, Date Of Deposit, Paid Amount and Save button on the Table.
feesCmpController.js JavaScript Controller File It is used for insert lookup field value, Date Of Deposit, Paid Amount value to server side apex method.
feesCmp.css Component Style CSS It is used for alignment the lookup popup section and spinner loading image on component.
newStudentCtr.apxc Apex Class Controller It is used for submit the lookup field value, Date Of Deposit, Paid Amount value to server through Save button

Custom Object:- Fees__c

Custom Object Fields:-

StudentName__c

CourseName__c

&DateOfDeposit__c

PaidAmount__c

Lookup Object:- NewStudent__c :- Get the Student name from lookup object field Lookup Object:- Course__c :- Get the Course name from lookup object field

Note:-Static resource zip file

You need to create $Resource.SLDS2016 SLDS zip file (static resource zip file)

Final Output

display picklist and radio values in lightning component -- w3web.net

Other related post that would you like to learn in lightning component.

Create Lightning Component

Step 1:- Create Lightning Component : feesCmp.cmp

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

feesCmp.cmp [Lightning Component File]

Create Component JavaScript Controller

Step 2:- Create Lightning Component : feesCmpController.js

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

feesCmpController.js [JavaScript Controller]

Create Component Style CSS

Step 3:- Create Lightning Component : feesCmp.css

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

feesCmp.css [Component Style CSS]

Create Apex Class Controller

Step 4:- Create Apex Class : newStudentCtr.apxc

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

newStudentCtr.apxc [Apex Class Controller]

insert record id of lookup field with apex controller in salesforce -- w3web.net

Further post that would you like to learn in lightning component.

 


 

FAQ (Frequently Asked Questions)

Can we create record type on custom object?

From the object management settings for a custom object, go to Record Types. Click New in the Record Types related list. Select Master from the Existing Record Type dropdown list to copy all available picklist values, or choose an existing record type to clone its picklist values.

What is a custom record in Salesforce?

A custom object record page allows your user to access custom object related data.

What is custom record type?

Custom Record Type permission: This permission is assigned to users through role assignments or global permissions. This permission grants a user up to all four access levels (view, create, edit, or full) and controls the user's access level to all custom record types.

  • Your reaction of the article ▾
 

Hi, This is Vijay 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

4 thoughts on “Create a record on custom Object to insert record Id of lookup field value with passing parameters to apex class using custom controller in Lightning Component Salesforce | how to insert lookup field in salesforce using apex”

  1. Hello Sir I’m having Error with C:svg found source.
    As well not completed the closed loop for controller page.
    please help for same.

    Reply

Leave a Comment