How to Create Custom Buttons in Salesforce

Create Detail Page Button in Salesforce

I worked as an admin for a company that used Salesforce. The sales team wanted an easy way to search Google for information related to their accounts without having to open a new browser tab. To simplify their task, I decided to add a custom button to the account object that redirects to Google and … Read more >>>

How to Convert String to Datetime in Salesforce Apex

Converted datetime from string in Salesforce apex

In our Salesforce org, we have a custom form field where users manually enter the date and time for follow-up meetings. The input is captured as a string from a custom form field. We need to convert this string input into a Datetime format so that we can create a follow-up event in the system … Read more >>>

50 Salesforce Admin Interview Questions and Answers

Salesforce Admin Interview Questions and Answers

The role of a Salesforce Admin is crucial in managing and optimizing a company’s Customer Relationship Management (CRM) system. In this tutorial, I have compiled 50 key Salesforce admin interview questions and answers to enhance one’s preparation for a Salesforce Admin position. These questions cover a range of expertise levels, from basic to advanced, providing insight … Read more >>>

How to Truncate String in Salesforce Apex

Truncate a string in Salesforce apex

Recently, I managed an email marketing campaign in our Salesforce org, and the marketing team uploaded email subject lines to Salesforce. However, to ensure consistency and avoid any issues with storage limits or formatting when sending emails, I need to truncate subject lines longer than 80 characters. In this Salesforce tutorial, you will learn how … 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 >>>

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

Convert a String to Decimal in Salesforce Apex

Salesforce apex Convert string to decimal list

While working as a Salesforce developer, I recently fixed an issue related to the input product pricing field data type. In the Salesforce application, there was a lightning component where the user could enter the product price, and by default, the input field was a string. To perform calculations with the entered value, such as … Read more >>>

Convert String to Boolean in Salesforce Apex

Convert String to Boolean in Salesforce Apex

Recently, I fixed a bug in a custom Salesforce Application where users had the option to turn off/on notifications. The preferences are stored as strings in a custom field on a User_Preference__c object. The possible values for this field are “true” or “false.” I had to convert these string values to Boolean values for the … Read more >>>

How to Convert String to ID in Salesforce Apex

Convert and add list of string to set of ID in Salesforce Apex

While working on a Salesforce development project, I was debugging an Apex class that was supposed to update an account record based on its ID, but I kept encountering an “Invalid ID” error. Then, I tested and validated a string conversion to an ID type in the developer console to ensure the conversion logic worked … Read more >>>