PDI · Question #132
Which action causes a before trigger to fire by default for Accounts?
The correct answer is B. Importing data using the Data Loader and the Bulk API. Before triggers on Accounts are invoked when records are inserted or updated, which includes operations like importing data via Data Loader and Bulk API.
Question
Which action causes a before trigger to fire by default for Accounts?
Options
- ARenaming or replacing picklist
- BImporting data using the Data Loader and the Bulk API
- CConverting Leads to Contact accounts
- DUpdating addresses using the Mass Address update tool
How the community answered
(30 responses)- A3% (1)
- B90% (27)
- D7% (2)
Why each option
Before triggers on Accounts are invoked when records are inserted or updated, which includes operations like importing data via Data Loader and Bulk API.
Renaming or replacing picklist values is a metadata configuration change and does not involve DML operations on individual records, therefore it will not fire a record trigger.
Importing data using the Data Loader or Bulk API directly involves DML operations (inserts, updates, upserts) on records. Apex `before` triggers are configured to execute automatically by default for all DML events performed via these API mechanisms before the data is committed to the database.
While converting leads to contact accounts involves DML operations that create or update Account and Contact records, which do fire triggers, the Data Loader and Bulk API represent a more direct and generic mechanism for triggering DML on existing or new records across various objects.
The Mass Address update tool performs DML update operations on Account records, which do fire `before update` triggers; however, it is a specific administrative UI function for targeted updates, whereas the Data Loader and Bulk API are broader, foundational mechanisms for programmatically interacting with Salesforce data that inherently fire triggers for all DML.
Concept tested: Apex trigger execution on DML operations
Source: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_triggers_concepts.htm
Topics
Community Discussion
No community discussion yet for this question.