Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.
exam questions

Exam Certified Platform Developer II All Questions

View all questions & answers for the Certified Platform Developer II exam

Exam Certified Platform Developer II topic 1 question 22 discussion

Actual exam question from Salesforce's Certified Platform Developer II
Question #: 22
Topic #: 1
[All Certified Platform Developer II Questions]

An environment has two Apex Triggers: an after-update trigger on Account and an after-update trigger on Contact. The Account after-update trigger fires whenever an Account's address is updated, and it updates every associated Contact with that address. The Contact after-update trigger fires on every edit, and it updates every Campaign Member record related to the Contact with the Contact's state.
Consider the following: A mass update of 200 Account records' addresses, where each Account has 50 Contacts. Each Contact has 1 Campaign Member. This means there are 10,000 Contact records across the Accounts and 10,000 Campaign Member records across the contacts.
What will happen when the mass update occurs?

  • A. The mass update will fail, since the two triggers fire in the same context, thus exceeding the number of records processed by DML statements.
  • B. There will be no error, since each trigger fires within its own context and each trigger does not exceed the limit of the number of records processed by DML statements.
  • C. There will be no error, since the limit on the number of records processed by DML statements is 50,000.
  • D. The mass update of Account address will succeed, but the Contact address updates will fail due to exceeding number of records processed by DML statements.
Show Suggested Answer Hide Answer
Suggested Answer: A 🗳️

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
nibbio
Highly Voted 2 years, 11 months ago
Selected Answer: A
The mass update will fail since the triggers fire in the same transaction. This will implies 20200 records updated by the DML statement where the limit is 10000
upvoted 9 times
...
Anjindal
Most Recent 5 months, 3 weeks ago
Selected Answer: A
Correct ans is A
upvoted 1 times
...
MetaLojiqTee
1 year, 3 months ago
Selected Answer: A
Both triggers execute in the same context
upvoted 1 times
...
Ike300
1 year, 7 months ago
Selected Answer: A
Each trigger run in it's own context and yet they all share same Transaction context and the governor limit of 10000 DML is for latter, the operation will fail
upvoted 1 times
...
Hemdene
1 year, 10 months ago
Mass update will fail with System.LimitException: Too many DML rows: 10001
upvoted 1 times
...
OmShantiVeg
2 years, 4 months ago
Ans is B , the first trigger is bellow 10001 threshold
upvoted 1 times
...
ChiaSam
2 years, 5 months ago
Answer is A as whole transaction will roll-back due to DML error so Account will also not inserted
upvoted 2 times
...
agjklsjrhgjksf
2 years, 6 months ago
Selected Answer: D
D is correct, even though both triggers share the same limit, 200 Accounts can be updated because they does not exceed that limit.
upvoted 1 times
...
suddeb
2 years, 8 months ago
Mass update will fail bcoz If trigger starts working from another trigger, they are executed in same transaction. Please refer the StackExchange: https://salesforce.stackexchange.com/questions/308165/invoking-a-trigger-from-another-trigger-execution-context
upvoted 4 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 ...