Salesforce Apex Trigger
'Video thumbnail for Find whether apex is currently executed in Trigger Context in Salesforce'
play_arrow
3:59
Find whether apex is currently executed in Trigger Context i...
Find whether apex is currently executed in Trigger Context in Salesforce

3K views · Jun 11, 2022 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'
play_arrow
9:00
SELF REFERENCE FROM TRIGGER Exception in Salesforce with Rol...
SELF REFERENCE FROM TRIGGER Exception in Salesforce with Roll-Up Summary

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.

'Video thumbnail for SELF REFERENCE FROM TRIGGER Exception in Salesforce'
play_arrow
4:44
SELF REFERENCE FROM TRIGGER Exception in Salesforce
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

'Video thumbnail for Trigger operationType in Salesforce Trigger'
play_arrow
4:07
Trigger operationType in Salesforce Trigger
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

'Video thumbnail for Add one hour to a DateTime field using Trigger in Salesforce'
play_arrow
3:10
Add one hour to a DateTime field using Trigger in Salesforce
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

'Video thumbnail for Deactivate Trigger in Salesforce without Editing or Deployment'
play_arrow
4:26
Deactivate Trigger in Salesforce without Editing or Deployme...
Deactivate Trigger in Salesforce without Editing or Deployment

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

'Video thumbnail for Record is read only error in Salesforce Apex Trigger'
play_arrow
2:40
Record is read only error in Salesforce Apex Trigger
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

'Video thumbnail for Salesforce Trigger on File Delete'
play_arrow
2:26
Salesforce Trigger on File Delete
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

'Video thumbnail for Prevent Chatter Posts on Salesforce Case Comments'
play_arrow
2:57
Prevent Chatter Posts on Salesforce Case Comments
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