How to Check if a String is Null, Empty or Blank in Salesforce Apex

Check string is Null in Salesforce apex

Recently, the sales team created a large number of leads manually in our Salesforce org. Information such as phone numbers and emails is crucial for Salesforce leads. To prevent lead creation with missing or invalid email addresses (e.g., spaces or blank values), we implemented an Apex trigger that verifies the Email field is not null, … Read more >>>

How to Create a New User Using Salesforce Apex

How to Create a New User Using Salesforce Apex

I was working as a Salesforce Developer, and recently, I was required to add new users to Salesforce programmatically. For that, I developed Apex code to create new users. In this tutorial, I will explain how to create a new user using Salesforce Apex. Create a New User With a Password Using Salesforce Apex In … Read more >>>

How to Split String Method in Salesforce Apex

String Split by dot in Salesforce apex

While working as a Salesforce developer, I developed a feature that allows users to enter multiple email addresses separated by commas into a custom field. There, I had to extract and validate each email address individually. To separate the emails, I have used the split() function to extract the emails from the string field. In … Read more >>>

How to Use Switch Statement in Salesforce Apex

In the recent Salesforce Apex development, I assigned priority levels to customer support cases based on their issue type, such as “technical,” “billing,” etc. I had to assign a priority to each case, like “high,” “medium,” or “low,” based on the issue type. I could have used if-else statements, but management handled multiple issues throughout … Read more >>>

Reset and Change User Password Using Salesforce Apex

How to Reset Current User Password From Salesforce Apex

A Salesforce Developer team was developing a Salesforce application that required the ability to reset and change user passwords programmatically. To do this, I created an Apex class. Here, I will explain how to reset and change user password using Salesforce Apex. Reset Current User Password Using Salesforce Apex In the following Apex program, I explain … Read more >>>

How to Convert String to Blob in Salesforce Apex

Convert string to blob in Salesforce apec

In Salesforce, a Blob is a collection of binary data stored as a single object. We can convert this data type to or from a String using the toString and valueOf methods, respectively. Recently, while developing an Apex class to generate a text file with content and store it in Salesforce as an attachment or file, … Read more >>>

Convert String to Lowercase and Uppercase in Salesforce Apex

Convert String to Uppercase in Salesforce Apex

Our Salesforce organization recently implemented a customization for handling customer data. The customer service team needs a standardized format for customer names and emails in their records. The customer service representatives often enter names and emails in mixed cases, leading to inconsistencies. The team wants to enforce a standardized format to avoid duplicates and errors … Read more >>>

Get Picklist Value In Salesforce Apex Class

How to get picklist values in Salesforce apex class

Recently, I worked as a Salesforce developer for an organization that manages multiple office locations across different countries. The company uses a custom Salesforce object called OfficeLocation__c to store details about each office location, such as its address, city, state, and country. The Country__c field on the OfficeLocation__c object is a picklist that stores the … Read more >>>

How to Activate or Deactivate User From Salesforce Apex

Deactivate User Using Apex Class in Salesforce

The organization where I work as a Salesforce developer decided to upgrade a system according to Salesforce’s new update. During the upgrade, they wanted to deactivate users with specific profiles to ensure data security. I was assigned the task of deactivating all users with a particular profile. Here, I will explain how to activate or … Read more >>>

Agentforce in Salesforce

DOWNLOAD FREE AGENTFORCE EBOOK

Start with AgentForce in Salesforce. Create your first agent and deploy to your Salesforce Org.

Salesforce flows complete guide

FREE SALESFORCE FLOW EBOOK

Learn how to work with flows in Salesforce with 5 different real time examples.