delete cross object records of selected row in salesforce -- w3web.net

How to retrieve data from multiple object and delete cross object records of selected row using apex wrapper class lightning component in Salesforce

Hey guys, today in this post we are going to learn about how to retrieve data from multiple object and delete cross object records of selected row using apex wrapper class lightning component in salesforce

Files we used in this post example

deleteNestedQueryWrapperCmp.cmp Lightning Component It is used for create a html table in lightning component.
deleteNestedQueryWrapperCmpController.js JavaScript Controller File It is used for fetch the retrieve related list record using init fuction.
deleteNestedQueryWrapperCmpHelper.js JavaScript Helper File It is used for refresh the content page after deleted the record.
deleteNestedQueryWrapperCmp.css Component Style CSS It is used for create a custom delete icon from static resource.
nestedQueryWrapperCtrl.apxc Apex Class Controller It’s retrieve the data from multiple object and delete cross object records of selected row from database server

Custom Parent Object:- NewStudent__c

Custom Parent Object Fields:-

Name,

Email__c

Address__c

Custom Child Lookup Object:- Registration__c

Custom Child Object Fields:-

Name,

RegNewStudent__r.Name

RegCourse__r.Name

DateOfRegistration__c

Custom Object and their fields In this post we used two type of custom sObject. First is Parent object (NewStudent__c) and Second is child sObject (Registration__c).

Final Output

delete cross object records of selected row in salesforce -- w3web.net

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

Step 1:- Create Lightning Component : deleteNestedQueryWrapperCmp.cmp

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

deleteNestedQueryWrapperCmp.cmp [Lightning Component File]

Step 2:- Create Lightning Component : deleteNestedQueryWrapperCmpController.js

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

deleteNestedQueryWrapperCmpController.js [JavaScript Controller]

Step 3:- Create Lightning Component : deleteNestedQueryWrapperCmpHelper.js

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

deleteNestedQueryWrapperCmpHelper.js [JavaScript Helper File]

Step 4:- Create Lightning Component : Component Style CSS : deleteNestedQueryWrapperCmp.css

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

Lightning Component [Component Style CSS]

Step 5:- Create Apex Class : nestedQueryWrapperCtrl.apxc

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

nestedQueryWrapperCtrl.apxc [Apex Class Controller]

delete cross object records of selected row in salesforce -- w3web.net

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

Leave a Comment