Trigger.newMap & Trigger.oldMap Context Variable in Apex Trigger

Create an Apex Trigger in Salesforce

In Salesforce, Apex triggers automate processes and apply custom logic during specific database operations, such as insert, update, delete, and undelete. In that, we use Trigger.newMap and Trigger.oldMap in Salesforce Apex, which are other types of context variables that return maps of the old versions of sObject records. When we start learning Apex Triggers in Salesforce, everything … Read more >>>

Trigger Helper Class in Salesforce

Create Trigger Helper Class in Salesforce

Usually, when we write Apex Triggers, we write the trigger and implement the logic in the same place. Let’s say you created a trigger to automate the process of updating fields on the Account object when a specific condition is met, such as when account revenue exceeds a certain amount, then the account priority is … Read more >>>

Before Insert Validation in Salesforce Trigger [With Examples]

Before Insert Validation in Salesforce Trigger

In Salesforce, users can sometimes create duplicate or invalid records. This can cause data duplication and confusion. To prevent this, we need to add a Before Insert Validation using a Salesforce Trigger, so that the record is checked before it is saved in the database. For example, when a new Account record is created, we … Read more >>>

Restrict Record Deletion Using Salesforce Trigger

Restrict Record Deletion Using Salesforce Trigger

While working as a Salesforce developer, I was required to write a trigger to restrict record deletion, as sometimes we need to prevent users from deleting important records. For example, An Account should not be deleted if it has active Opportunities. Salesforce does not provide this restriction by default, so we need a trigger to … Read more >>>

Before vs After Triggers in Salesforce: When to Use & Why

Before vs After Triggers in Salesforce

In Salesforce, to automate processes such as updating records, sending emails, or assigning tasks, we use Salesforce Flows. However, there are sometimes complex requirements that Flows cannot handle directly, such as making multiple record updates in bulk, performing complex validations, or working with related records. In such cases, we use Apex Triggers to write custom … Read more >>>

Create User Registration Form Using Salesforce Visualforce

Create User Registration Form Using Salesforce Visualforce

In Salesforce, we use the Visualforce pages to add custom features to the org’s user interface. We can also create custom forms using Visualforce pages, allowing us to capture user data in the input field and save it directly to Salesforce objects. In this Salesforce tutorial, I will explain how to create a user registration form … Read more >>>

How to Add Visualforce Page Tab in Salesforce

Add Visualforce Page As a Tab in Salesforce

While working as a Salesforce developer, I got a requirement to create a custom search page using a Visualforce Page. This page should allow users to search records by entering multiple input field values. The search results should display in a table format on the same page, so users can quickly find and view the … Read more >>>

Create a Visualforce Page with Apex Controller in Salesforce

Create a Visualforce Page with Apex Controller in Salesforce

I work as a Salesforce developer in a company that uses Salesforce to manage its business. Our sales team creates business agreements with customers using the Contract object. When a contract expires, the sales team needs to renew it to continue the agreement. Usually, users have to open the contract record and click the Renew … 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.