Queueable classes are great to use and provides a wide range of advantages when compared to future methods. But there are some undocumented limitations which you will come across if you are using Queueable classes extensively inside your batch classes. Lets take an example of badly written trigger on Account. trigger AccountTrigger on Account (before insert) { for(Account acc: Trigger.new){ Database.executeBatch(new CreateContactBatch(), 2); } } The above trigger calls a batch class for every account record that gets inserted in database. So if you insert N accounts in a single transaction via dataloader or anonymous block or through any other means, the trigger will execute the batch class N number of times. Below is the code for batch class: global class CreateContactBatch implements Database.Batchable<sObject> { global Database.QueryLocator start(Database.Bat...
Today we will have a look at how to create a lightning component for countdown timer which can be used on pages where an operation needs to be completed within a specific time period. Example, an online exam or a banking transaction which expires after a specific time period. The component contains a datetime field which represents the end time. Once the user selects the date and time and clicks on Start Timer button, the countdown timer will start. Below is the lightning component: CountdownTimer.cmp <aura:component implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId" access="global" > <aura:attribute name="endTime" type="String"/> <aura:attribute name="timeLeft" type="String"/> <lightning:tile label="Time Left" class="slds-page-header"> {!v.timeLeft} </lightning:tile...
Today, we will have a look at how to draw charts in LWC. As of today, there is no lightning component available out of the box which provides us with the ability to display charts. But the good news is that we can use third-party JavaScript libraries in LWC to display a chart. In this blog, we will see how to use a popular third party JavaScript library called Chart.js in our LWC application. Want to try the application hands-on? Install the unmanaged package in your Salesforce developer org. A working version of this application can be accessed here . You need to perform the below steps in order to use any third-party library in a lightning web component: Download the 3rd party library, zip the file and upload it as a Static Resource in your Salesforce org. You can download Charts.js from here . Please note that I have used version 2.7.3 because the latest version of Charts.js is not compatible with the locker service. I figured this out after spending a day getting the l...
I Ravi,May I have the apex controller PicklistController.apxc
ReplyDelete