Salesforce Apex Trigger
Video thumbnail for Find whether apex is currently executed in Trigger Context in Salesforce
Find whether apex is currently executed in Trigger Context in Salesforce

infallibletechie.com

Trigger.isExecuting can be used to find whether apex is currently executed in Trigger Context in Salesforce.

Video thumbnail for SELF REFERENCE FROM TRIGGER Exception in Salesforce with Roll-Up Summary
SELF REFERENCE FROM TRIGGER Exception in Salesforce with Roll-Up Summary

infallibletechie.com

As per the order of execution in Salesforce, "If the record contains a roll-up summary field or is part of a cross-object workflow, performs calculations and updates the roll-up summary field in the parent record. Parent record goes through save procedure

Video thumbnail for SELF REFERENCE FROM TRIGGER Exception in Salesforce
SELF REFERENCE FROM TRIGGER Exception in Salesforce

infallibletechie.com

SELF_REFERENCE_FROM_TRIGGER error or exception from Salesforce Apex indicates that a DML operation like update or delete on a record is already being updated by another trigger. So, it throws this exception. Blog Post: https://www.infallibletechie.com/20

Video thumbnail for Trigger operationType in Salesforce Trigger
Trigger operationType in Salesforce Trigger

infallibletechie.com

Switch statement should be utilised to use Trigger.operationType in Salesforce Trigger. Trigger operationType in the Salesforce Trigger avoids multiple if else conditions to check trigger.isInsert, trigger.isUpdate, trigger.isBefore, trigger.isAfter, etc

Video thumbnail for Add one hour to a DateTime field using Trigger in Salesforce
Add one hour to a DateTime field using Trigger in Salesforce

infallibletechie.com

addHours() can be used to add one hour to a Date Time field using Trigger in Salesforce. Blog Post: https://www.infallibletechie.com/2022/07/how-to-add-one-hour-to-a-datetime-field-using-trigger-in-salesforce.html

Video thumbnail for Deactivate Trigger in Salesforce without Editing or Deployment
Deactivate Trigger in Salesforce without Editing or Deployment

infallibletechie.com

We can inactivate or deactivate Trigger in Salesforce without Editing or Deployment. Blog Post: https://www.infallibletechie.com/2023/01/deactivate-trigger-in-salesforce-without-editing-or-deployment.html

Video thumbnail for Record is read only error in Salesforce Apex Trigger
Record is read only error in Salesforce Apex Trigger

infallibletechie.com

Exception: System.FinalException: Record is read-only Field update cannot be done after the record has been Inserted/Updated/Saved. So, use after insert or after update as the trigger events. Blog Post: https://www.infallibletechie.com/2013/02/record-is

Video thumbnail for Salesforce Trigger on File Delete
Salesforce Trigger on File Delete

infallibletechie.com

When a file is deleted in Salesforce, trigger on ContentDocument object/entity fires. But, the trigger on ContentDocumenLink object/entity will not fire. Blog Post: https://www.infallibletechie.com/2024/02/salesforce-trigger-on-file-delete.html

Video thumbnail for Prevent Chatter Posts on Salesforce Case Comments
Prevent Chatter Posts on Salesforce Case Comments

infallibletechie.com

To prevent Chatter Posts on Salesforce Case Comments, we can develop a trigger on FeedComment object or entity. Blog Post: https://www.infallibletechie.com/2023/11/how-to-prevent-chatter-posts-on-salesforce-case-comments.html