CRT-450 practice question 8 of 30

Which action causes a before trigger to fire by default for Accounts?

Full set: 201 questions
Answer options
A: Renaming or replacing picklists
B: updating addresses using Mass Address updated tool
C: Importing data using the Data Loader and the Bulk API Correct answer
D: Converting Leads to Contacts
Correct Answer:
C. Importing data using the Data Loader and the Bulk API
Explanation

Apex triggers are designed to execute in response to Data Manipulation Language (DML) operations such as insert, update, or upsert. Importing data using the Data Loader, whether with the SOAP API or the Bulk API, directly performs these DML operations on records. By default, these operations invoke the standard Salesforce order of execution, which includes firing any before triggers on the target object (in this case, Accounts) for each batch of records processed. This is a fundamental and expected behavior of data loading via the API.

References

1. Apex Developer Guide, "Triggers": "A trigger is Apex code that executes before or after specific data manipulation language (DML) events occur, such as before object records are inserted into the database, or after records have been deleted." This establishes that DML operations, like those performed by Data Loader (Option C), are the direct cause of triggers firing.

2. Apex Developer Guide, "Triggers and Order of Execution": This guide details the sequence of events during a save operation initiated by any means (including an API call from Data Loader), confirming that before triggers are executed early in the process.

3. Bulk API 2.0 and Bulk API Developer Guide, "Introduction to Bulk API 2.0": The guide explains that the Bulk API is used to "query, queryAll, insert, update, upsert, or delete a large number of records." These are all DML operations that invoke the standard execution order, including triggers.

4. Salesforce Help, "Mass Update Addresses": "The Mass Update Addresses tool doesn't trigger workflow rules, validation rules, or Apex triggers." This directly invalidates Option B.

5. Salesforce Help, "Considerations for Converting Leads": "When you convert a lead... Apex triggers are fired." This confirms the action in Option D does fire triggers, but as explained, Option C is the more direct and fundamental answer.

Scroll to Top