PDI practice question 30 of 30

Which two actions may cause triggers to fire? Choose 2 answers

Full set: 201 questions
Answer options
A: Changing a user's default division when the transfer division option is checked
B: Updates to FeedItem Correct answer
C: Cascading delete operations Correct answer
D: Renaming or replacing a picklist entry
Correct Answer:
B. Updates to FeedItem; C. Cascading delete operations
Explanation

Apex triggers are invoked by Data Manipulation Language (DML) events such as insert, update, delete, and undelete. Cascading delete operations (C) occur when a parent record in certain relationships (e.g., master-detail) is deleted, causing its child records to be deleted as well. Each deletion of a child record is a DML delete event that will fire any triggers on that child object. Updates to FeedItem (B), which represents a Chatter post, are standard update DML events. Like most standard and all custom objects, FeedItem supports triggers, so an update will cause its associated triggers to fire.

Why Incorrect

A. Changing a user's default division when the transfer division option is checked: This is a setup change. While the resulting record ownership transfers are update DML operations that fire triggers, the initial action itself is not a direct DML event.
D. Renaming or replacing a picklist entry: This is a metadata change. Although this action can initiate a mass update DML operation on records using that value, the action itself is a metadata configuration, not a direct DML event.

References

1. Apex Developer Guide, "Triggers": The guide introduces triggers by stating, "Apex triggers enable you to perform custom actions before or after events to records in Salesforce, such as insertions, updates, or deletions." This establishes the direct link between DML events and trigger execution.

2. Apex Developer Guide, "Triggers and Order of Execution": This section details the sequence of events that occur during a DML operation, confirming that triggers are a core part of the DML execution path. Both an update (like on a FeedItem) and a delete (as in a cascade delete) initiate this order of execution.

3. Salesforce Help, "Considerations for Deleting Records": In the context of relationships, the documentation states, "Deleting a parent record deletes its child and grandchild records in a cascade delete... Triggers on the child objects are fired." This directly confirms that cascading deletes fire triggers.

4. Object Reference for Salesforce and Lightning Platform, "FeedItem": The documentation for the FeedItem sObject lists trigger as a supported call, confirming that DML operations on this object can invoke Apex triggers.

Scroll to Top