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 […]
Trigger.new of Apex Triggers
This variable returns a list of the new version of sObject records. This list is only available in insert, update, and undeletes triggers.Example:- t trigger ApexTrigger on Account(before insert) { for (Account acc: Trigger.new) { acc.NumberOfEmployees = 100; } }
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 BeforeTrigger on Account(before insert) { System.debug (‘before insert.’); } Trigger AfterTrigger on Account(after insert) { System.debug(‘after insert.’); }
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.’); }
What is the Salesforce Apex Trigger?

In Salesforce, ApexTrigger is a piece of code that is used to execute custom business logic before or after certain events occur on records in a Salesforce database. Where1. TriggerName – The Name of the ApexTrigger2. ObjectApiName – The API Name of the Object3. TriggerEvents – The Trigger events could be any of the following(before, after) trigger TriggerName on ObjectName(trigger_events) { […]
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. […]
