
Find whether apex is currently executed in Trigger Context i...
3K views · Jun 11, 2022 infallibletechie.com
Trigger.isExecuting can be used to find whether apex is currently executed in Trigger Context in Salesforce.

SELF REFERENCE FROM TRIGGER Exception in Salesforce with Rol...
931 views · Jun 15, 2022 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." It will do the Save Procedure again due to Roll-Up calculation. So, in before trigger context, avoid updating records which will recalculate the Roll-Up calculation.

SELF REFERENCE FROM TRIGGER Exception in Salesforce
2K views · Aug 16, 2022 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/2022/06/selfreferencefromtrigger-exception-in.html

Trigger operationType in Salesforce Trigger
2K views · Sep 28, 2022 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.. Blog Post: https://infallibletechie.com/2022/08/how-to-use-trigger-operationtype-in-salesforce-trigger.html

Add one hour to a DateTime field using Trigger in Salesforce
13K views · Oct 10, 2022 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

Deactivate Trigger in Salesforce without Editing or Deployme...
18K views · May 29, 2023 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

Record is read only error in Salesforce Apex Trigger
60K views · Jul 9, 2023 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-read-only-error-in-apex.html

Salesforce Trigger on File Delete
348 views · Mar 17, 2024 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

Prevent Chatter Posts on Salesforce Case Comments
232 views · Apr 12, 2024 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