Month: October 2018

Lightning Component Clone with Related Records

In this blog, I am going to explain a simple quick action lightning component that will clone the records and its related data also. In this example, I am controlling which all objects are allowed to as part of the cloning is through the custom metadata data types.

These are the records for metadata 

Apex Class

Lightning Component 





Creating Quick Action 

You will be able to create quick action with the above components shown below.Go to the object manager and create a quick action as shown below.

After saving the action, add this action to the page layout. this component we can reuse it on any object.

Once the user clicks on the clone button its will clone the parent and all child records data along with relationship as shown below.



Lightning App Background Utility Items

In this blog, I am going to show how to use the background utility items run without a visible entry in the utility bar. background utility items provide an unobtrusive way to add functionality to your Lightning apps without cluttering the user experience. In standard navigation and console navigation apps, you can create and add background utility items to invisibly execute code. Implement the lightning:backgroundUtilityItem interface to use a custom component as a background utility item. In this example, I am logging the details into the custom object whenever the user landing into the application for audit purpose. here is the simple custom object that will be used to store the audit history

Apex Class

Lightning Component 

Add Component to  Utility Bar 

  1. Navigate to Setup > App Manager > New Lightning App
  2. Edit the Lightning  App > Under the App Settings >Utility Items > Add Utility item as shown below. Save it 


After adding the background utility item to the app whenever the user landed on the application it will log into the custom object and shows the notification message as shown below.



Multiple Leads Conversion with Lightning Component

Simple code to convert multiple Leads at a time.

Apex Class 


Lightning Component