exam questions

Exam CRT-450 All Questions

View all questions & answers for the CRT-450 exam

Exam CRT-450 topic 1 question 150 discussion

Actual exam question from Salesforce's CRT-450
Question #: 150
Topic #: 1
[All CRT-450 Questions]

A developer identifies the following triggers on the Expense__c object: deteleExpense, applyDefaultsToExpense, validateExpenseUpdate;
The triggers process before delete, before insert, and before update events respectively.
Which two techniques should the developer implement to ensure trigger best practices are followed? (Choose two.)

  • A. Unify the before insert and before update triggers and use Process Builder for the delete action.
  • B. Create helper classes to execute the appropriate logic when a record is saved.
  • C. Maintain all three triggers on the Expense__c object, but move the Apex logic out of the trigger definition.
  • D. Unify all three triggers in a single trigger on the Expense__c object that includes all events.
Show Suggested Answer Hide Answer
Suggested Answer: BD 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
JCTheGenius
Highly Voted 2 years, 8 months ago
B and D looks good to me: https://developer.salesforce.com/forums/?id=906F0000000DBl8IAG C also but we had to choose 2 only.
upvoted 11 times
Ganmook
2 years, 8 months ago
What you think about B and C?
upvoted 1 times
Simon28
2 years, 8 months ago
In C we have 3 triggers for 1 object, in "trigger good practises" you can find rule : one trigger per one object
upvoted 7 times
...
...
...
Brinuz
Most Recent 9 months, 3 weeks ago
Selected Answer: BD
B & D are right
upvoted 2 times
...
govosen887
1 year, 1 month ago
Selected Answer: BD
From what I remember, the good practices are to have one trigger per object and to move actual logic out of the trigger.
upvoted 2 times
...
ApexMike
1 year, 7 months ago
Selected Answer: BD
A doesn't work. B and D are the correct answers.
upvoted 3 times
...
AK112233
2 years, 4 months ago
Answer should be B & D
upvoted 2 times
...
JCTheGenius
2 years, 8 months ago
Response A doesn't make sense
upvoted 1 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago