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 Get Current User Info Using Apex in Salesforce

How to Get Current User Info Using Apex in Salesforce

As a Salesforce Developer, I was required to display the details of the currently logged-in user, such as their name, email, and profile, in Salesforce. This feature might be used in a dashboard where users can see their account information. To achieve this requirement, I developed an Apex class that retrieves current user details. Here, … 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 >>>

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

Variables and Data Types in Salesforce Apex

Variables and Data Types in Salesforce Apex

In Salesforce, Apex is a programming language used to work with the UI and data model in the org. Apex is designed to solve complex business logic that we cannot complete using a declarative approach. In this tutorial, I will explain variables and data types in Salesforce Apex, as well as various data types and … Read more >>>

How to Get Current Datetime in Apex Salesforce

How to get my correct current local time in Apex

The organization where I work as a Salesforce developer has a global Salesforce implementation with users in multiple time zones. When scheduling tasks or reminders, it’s crucial to ensure that each user creates these events at the correct local time. When a user logs in to Salesforce, the system must display the current time and … Read more >>>

Convert a String to an Integer using Apex in Salesforce

Salesforce apex convert string to integer

Recently, while building a custom class for user input in my Salesforce org, where I was customizing the fields for the Contact object, I noticed a custom field ‘age’ in the contact that stores the data in string format. I had to convert this string data into an integer to make it convenient to validate … Read more >>>

How to Connect VS Code to Salesforce Org

I recently started a new role as a Salesforce Developer at a small startup consultancy. For the first time, I had to set up Visual Studio Code for Salesforce. VS Code is the most appealing option due to its suite of Salesforce add-ons and SFDX integrations. Here, I will explain how to connect VS Code to … 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.