How to Add Days, Months, and Years to Date field in Salesforce Apex

Add months to specific date field in Salesforce Apex

Recently, while working as a Salesforce developer, I received a task to add days, months, and years to a date field. The requirement was to automate the user subscription trial extension. When new customers sign up for a product trial, they receive a 14-day trial period by default. However, the sales team offers a 7-day … Read more >>>

Schedule Jobs Using the Apex Scheduler in Salesforce

Schedule jobs via Apex Class in Salesforce

While working as a Salesforce developer, I was tasked with scheduling the weekly email for sales representatives. To do this, I used the Salesforce Apex Scheduler to schedule a job that runs weekly, retrieves the necessary data, and sends emails to sales representatives. In this Salesforce tutorial, I will explain the Salesforce Apex Scheduler and … Read more >>>

Create a Renewal Opportunity in Salesforce

How to Create a Renewal Opportunity With Salesforce Flow

While working as a Salesforce administrator, I was working on the renewal of Opportunities. The company wants to ensure that its Account Managers can easily track when a customer’s subscription is about to expire and create renewal opportunities to manage the renewal process efficiently. As a solution, I created a flow that creates a renewal … Read more >>>

How to Convert Date to String in Salesforce Apex

Salesforce convert date string in 'yyyy-mm-dd' format

While working as a Salesforce developer, I created a report that displayed the last activity date for each account. The LastActivityDate field in Salesforce is a Date type, but I wanted to display it as a formatted string, such as “October 1, 2024” in a custom email notification. To achieve this, I converted the Date to a … Read more >>>

How to Convert ID to String in Salesforce Apex

Convert Id to string in Salesforce apex

While working as a Salesforce developer, I recently converted data types for some object fields. There was a custom object called User_Activity_c. This object has a field Related_record_c to store the record’s ID associated with the activity. Since the Related_Record__c field is a text field, I had to convert the ID type to a string … Read more >>>

Enable and Create Recurring tasks in Salesforce

Create recurring tasks for quarter in Salesforce

While working as a Salesforce system admin, I received a request from the Sales team to enable the recurring tasks. The sales team managed opportunities, with each open opportunity requiring a follow-up call from the sales representative every week until the deal was closed. Instead of manually creating follow-up tasks, they opted for recurring tasks … 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 >>>

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

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

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.