Bypass Duplicate Rules Using Salesforce Apex

Bypass Duplicate Rules Using Salesforce Apex

You may face a duplicate error when creating or updating records using Apex code in Salesforce. This happens when Duplicate Rules are active and detect a matching record. In some cases, you may want to bypass these duplicate rules, such as during data import, integration, or when implementing specific business logic. In this tutorial, we … Read more >>>

Call Apex Method With Parameters in Lightning Web Component

Call Apex controller class with parameters in lwc

In Salesforce Apex classes, we can define class methods in two ways: one without parameters, where we simply want to fetch static data in the LWC component by calling the Apex method. The other method is with parameters, which are mapped with input fields in the Lightning web component and used in scenarios such as … Read more >>>

How to Write a Test Class For an Apex Trigger in Salesforce

Test Class For an Apex Trigger in Salesforce

As a Salesforce Developer, I needed to automate a process using an Apex Trigger. The trigger automatically creates a contact record whenever the sales team creates a new account for a customer. I wrote a test class to ensure the trigger works as expected and the trigger code is error-free. This test class also verifies … Read more >>>

addError() Method in Salesforce Apex

addError() Method in Salesforce Apex

We create validation rules in Salesforce to show errors on the record detail page. When a user enters incorrect data, the validation rule stops the save and displays an error message. But when working with Apex, sometimes validation rules are not enough. For example, we need to use Apex code to check complex conditions or … Read more >>>

String Class Methods in Salesforce Apex

String Class Methods in Salesforce Apex

When we work on strings in Apex, we often take inputs like names, emails, or messages from forms or records. For example, suppose you’re building a custom form where users enter their full name and email. Before saving this data to Salesforce, you want to ensure everything looks good. You need to check that the … Read more >>>

Assign Tasks in Salesforce Using Apex

Assign Tasks in Salesforce Using Apex

Usually, when we want to assign a task to users or a queue, we do it manually from the record detail page. But what if I told you we can automate this task assignment process using a Salesforce Apex class? Yes, with Apex, we can write logic to automatically assign tasks to specific users or … Read more >>>

How to Clone the Record With Related List in Salesforce

Clone Related list in Salesforce

To create similar records in Salesforce, we have an option to clone that specific object record using the Clone quick action. But it does not clone child records in a master-detail relationship, such as an Opportunity that has Opportunity Products and Quotes. In the Accounts object, you will get the option to clone the related … Read more >>>

Virtual Class in Salesforce Apex

Virtual Class in Salesforce Apex

In object-oriented programming, we extend the parent class to reuse code and add new features in the child class without rewriting everything from scratch. This is what we call inheritance. In Java, when we need to inherit from any class, we need to use the extends keyword to create the child class. However, in Salesforce … Read more >>>

Salesforce Apex With, Without, Inherited and Omitted Sharing

Implement with sharing in Salesforce Apex

In a Salesforce Apex class, we can define the sharing settings to control data access and ensure security within the Salesforce platform. To manage how Apex classes follow record-level access, we use keywords such as with sharing, without sharing, inherited sharing, and omitted sharing in Salesforce Apex. In this blog, we’ll learn what each of … Read more >>>

Send An Email to User and Public Group Using Apex in Salesforce

How to Send Email to User Using Apex in Salesforce

In Salesforce, we have a flow automation feature that allows us to automate processes such as record updates, task assignments, creation of related records, and sending automated emails. However, we can use Salesforce Apex when the logic is complex or when working with a large number of records. Triggers are written in code, which provides … Read more >>>

live webinar

Salesforce Data Cloud with Agentforce Data Library

In this live webinar, we will showcase how Salesforce AI Agents use business data and documents to provide intelligent responses using Agentforce Data Library and Salesforce Data Cloud.

Agentforce in Salesforce

DOWNLOAD FREE AGENTFORCE EBOOK

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