Year: 2023
-
How to export Apex Test Class Coverage

If you want to export a report like below, then its very simple and in a minute you can get the same. Just follow below steps:
-
Dynamically Get Picklist Label & Values of any Object & Field in Salesforce

You can create a dynamic method to retrieve the picklist labels and values for any object and field in Salesforce. Here’s a dynamic method that takes the object API name and field API name as parameters: Now you can call the method to get the value. Like: Happy Learning 😊
-
Apex Trigger Framework

Triggers are Apex scripts that execute before or after data manipulation events, such as before or after records insert, update, or delete. They are written to perform tasks that can’t be done by using point-and-click tools in Salesforce. But writing ✍️ Trigger in proper way with proper design makes it more…
-
How to get Picklist field API and Label both in Apex

This requirement can be achieved using Schema class. PFB one example UtilityClass which will return the API to Label mapping. PFB the Output:
-
Dynamic/Reusable Table in LWC (Salesforce)

Use-case: Suppose in your application you have 10 tables to show. So instead of writing code for each table, you can think of this dynamic/reusable table. Create Dynamic/Reusable Table Create a Custom Metadata Type named Table_Column_Metadata__mdt. Add fields to store column information such as API_Name__c (API name of the field),…
-
How to add straight line in LWC (Salesforce)

CSS will do the job. Sharing sample code. Component: CSS:
-
How to avoid recursion in Salesforce

Recursion is a major problem in applications. It’s always better to keep the Recursion in mind before you implement any business automation requirement. Sharing some of the general strategy to avoid/fix recursion: Apex Class Apex Trigger Static in Salesforce are per transaction, so the value will be true only for…
-
How to create Free Salesforce Developer Org

It’s very simple. Just redirect to https://developer.salesforce.com/signup and fill all details and click on ‘Sign me up’. You will receive an email to setup the password. Just follow the instruction and you are good to create a developer edition org. Salesforce has implemented a restriction on creating accounts using a…
-
How To Add Line-break in Custom Label in Lightning Component

There are three ways you can achieve this. When you use this custom label in your Lightning Component, the \n escape sequence will be interpreted as a new line, and the text will appear on two separate lines. he newline escape sequence \n is not directly recognized and rendered as…

