What is Salesforce Sandbox?

A Salesforce Sandbox is a duplicate of your organization’s Salesforce setup used for testing and development. It provides a separate space where developers and administrators can experiment with changes without affecting the live production environment. A Sandbox is like a virtual testing ground where businesses can try out new features, test changes, and solve problems […]

Master-Detail Relationship in Salesforce: A Step-by-Step Guide

What is a Master-Detail Relationship? A Master-Detail Relationship is a strict type of association between two objects where the child record (detail) depends on the parent record (master). If the master record is deleted, the related detail records are automatically deleted, enforcing a clear hierarchy. Key features of the Master-Detail Relationship include: Strict Parent-Child Dependency: […]

Understanding Lookup Relationships in Salesforce: A Step-by-Step Guide

What is a Lookup Relationship? A Lookup Relationship in Salesforce is a loose association between two objects, allowing you to create links between records in a way that is more flexible than a Master-Detail Relationship. In a Lookup Relationship, the child record can exist independently of the parent. This makes Lookup Relationships ideal when there […]

Factors that Affect Data Access

Some factors affect access to your organization’s data. When using the API, the following factors affect access to your organization’s data: Access Object-Level and Field-Level Security Sharing User Permissions User Permissions that Override Sharing Objects properties Related Objects Page Layout and Record Types Acces Your organization must be enabled for API access.Objects may not be […]

Context Variables of Apex Triggers

Apex Triggers have access to several context variables that provide information about the trigger event and the records involved. These context variables are automatically provided by Salesforce and can be used within the trigger code to perform various operations. These context variables provide a lot of information about the trigger event and can be used […]

Trigger Events in Salesforce

There are multiple apex trigger events for both before & after context DML  –before insert– after insert– before update– after update– after undelete– before delete– after undelete

Types of Apex Triggers in Salesforce

There are two types of Triggers in Salesforce: trigger FirstTrigger on Account(before insert) { System.debug(‘I am before insert.’); } Trigger SecondTrigger on Account(after insert) { System.debug(‘I am after insert.’); }

Accessing Hierarchy Custom Setting data

You can similarly try accessing the Hierarchy Custom Setting data with the following methods. To return a custom setting data set record for the current logged in user. Use the getInstance() method. To return a custom setting data set record for a specific userId/ProfileId, Use the getInstance(userId/ProfileId) method. To return the custom setting record data set for the […]

Accessing List Custom Setting data

We can access the data using the custom settings methods. They are all instance methods, that is, they are called by and operate on a specific instance of a custom setting. To fetch the custom fields associated with a list setting, use getAll() method. It returns a map of data set names and custom setting records. […]

How to create a Custom Settings?

Search for Custom Settings in your setup, and create new Custom Setting and enter the required information in the fields. Note: If the setting type is disabled, go to schema settings from setup and enable “Manage list custom settings type”. Now, create Custom fields under the custom setting definition that we just created. Now Click […]