Skip to content

Instantly share code, notes, and snippets.

@raja-klnce
raja-klnce / liveProgressBarWebCmp.css
Created September 28, 2020 02:42
Live Progress Bar using LWC & Streaming API
.spinnerHolder{
position: relative !important;
display: inline-block !important;
width: 2% !important;
}
.slds-spinner_container {
position: relative !important ;
display: inline-block !important;
width: 2% !important;
}
@raja-klnce
raja-klnce / ExecuteDmlQueuableBatches.cls
Created September 28, 2020 02:39
Execute DML in batches using queueable chain
/* Name: ExecuteDmlQueuableBatches
Description : Utility class that chunks list of sobject records and does DML by chained queuable jobs with
the desired batch size
Author : Raja Karuppasamy
*/
public with sharing class ExecuteDmlQueuableBatches implements Queueable {
private Map<Integer, List<Sobject>> records;
private String action; //insert or update or upsert or delete
private Integer batchSize;
private Integer currentBatch;
@raja-klnce
raja-klnce / CrudFlsUtility.cls
Last active July 3, 2022 19:20
CRUD FLS Check
/* Name: CrudFlsUtility
Description : Utility class that contains methods to help in CRUD & FLS checks
Author : Raja Karuppasamy
*/
public with sharing class CrudFlsUtility {
/*
Purpose: Used to check CRUD & FLS access for the logged in user using StripInaccessible feature
Input(s): records - List of Sobjects that you either queried already or going to be used in DML
accessCheck - AccessType enum - CREATABLE/READBLE/UPDATABLE/UPSERTABLE
checkCRUD - Flag to enforce CRUD check