How to Create a Related List in Salesforce

How to Create a related list in salesforce

Our Salesforce org has a custom object, project, to track all the ongoing project activities. We had to link the Client(Account ) to the Project to track specific clients’ projects. On the client’s detail page, we could see the projects. A lookup relationship was needed with the Project object, so the project management team wanted to display the related … 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 >>>

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 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 >>>

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 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 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 Add Standard Price to Product in Salesforce

Add standard price to Custom price book in Salesforce

In our Salesforce org, I added the products to the Standard price book. Later, we created a custom price book to set different pricing for different markets. In the price books, we wanted a few products to have standard pricing in all custom price books. In the solution, I came to know that we can … Read more >>>

Convert String to sObject in Salesforce Apex

How to convert String to sObject in Salesforce apex

While building a custom app in our Salesforce org, I added a feature where users can input the object’s name and other fields as strings. That dynamically creates and populates records based on user input or another source. In this case, I had to create an account record using a string to specify the object … Read more >>>

Convert String to Date in Salesforce Apex

Salesforce apex convert string to date

In a recent Salesforce development task, I worked on a Salesforce application that required me to collect customer information through a web form. One of the fields in this form is the customer’s preferred appointment date, which is submitted as a string. I had to convert the string to the date data type to save … Read more >>>