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 | how to delete cross object records of selected row

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.

Create Lightning Component

Step 1:- Create Lightning Component : deleteNestedQueryWrapperCmp.cmp

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

deleteNestedQueryWrapperCmp.cmp [Lightning Component File]

Create Component JavaScript Controller

Step 2:- Create Lightning Component : deleteNestedQueryWrapperCmpController.js

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

deleteNestedQueryWrapperCmpController.js [JavaScript Controller]

Create Component JavaScript Helper

Step 3:- Create Lightning Component : deleteNestedQueryWrapperCmpHelper.js

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

deleteNestedQueryWrapperCmpHelper.js [JavaScript Helper File]

Create Component Style CSS

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]

Create Apex Class Controller

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.

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]

Leave a Comment