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

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.

Step 1:- Create Lightning Component : feesCmp.cmp

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

feesCmp.cmp [Lightning Component File]

Step 2:- Create Lightning Component : feesCmpController.js

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

feesCmpController.js [JavaScript Controller]

Step 3:- Create Lightning Component : feesCmp.css

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

feesCmp.css [Component Style CSS]

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.

2 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”

Leave a Comment