New Year Sale 2026! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Salesforce Certified Platform Developer II (Plat-Dev-301) Exam - Topic 3 Question 45 Discussion

Actual exam question for Salesforce's Salesforce Certified Platform Developer II (Plat-Dev-301) exam
Question #: 45
Topic #: 3
[All Salesforce Certified Platform Developer II (Plat-Dev-301) Questions]

Universal Containers has an Apex trigger on Account that creates an Account Plan record when an Account is marked as a Customer. Recently a workflow rule was added so that whenever an Account is marked as a Customer, a 'Customer Since' date field is updated with today's date.

Since the addition of the workflow rule, two Account Plan records are created whenever the Account is marked as a Customer.

What might cause this to happen?

Show Suggested Answer Hide Answer
Suggested Answer: B

Contribute your Thoughts:

0/2000 characters
Dominga
4 months ago
Nah, I don't think that's it. The trigger should handle it fine.
upvoted 0 times
...
Leota
4 months ago
Wait, are we sure the trigger is bulk safe?
upvoted 0 times
...
Cherrie
4 months ago
I think it's the workflow rule re-evaluating after the field change.
upvoted 0 times
...
Malcom
4 months ago
Definitely a static variable issue!
upvoted 0 times
...
Gennie
4 months ago
Sounds like the trigger is firing multiple times.
upvoted 0 times
...
Geoffrey
5 months ago
I recall that bulk safety is important in triggers, but I'm not convinced that calling insert in a loop would cause this specific issue. It seems more related to how the workflow is set up.
upvoted 0 times
...
Cheryll
5 months ago
I practiced a question similar to this, and I think the issue might be with the Apex trigger not using a static variable. That could cause it to fire multiple times for the same change.
upvoted 0 times
...
Belen
5 months ago
I'm not entirely sure, but I think if the workflow rule has 'Re-evaluate Workflow Rules After Field Change' checked, it might trigger the Apex again, leading to the duplicate records.
upvoted 0 times
...
Fallon
5 months ago
I remember that workflow rules can trigger multiple times if they're set to evaluate on both create and edit. That could definitely cause the double Account Plan records.
upvoted 0 times
...
Brunilda
5 months ago
Okay, I've got this. Correlation rules are the ones that look for multiple events within a specified time frame, so that's the answer.
upvoted 0 times
...
Carlota
5 months ago
I think I've got this one. The key is to use a function that generates a random integer within the specified range. I'd go with option B, random.randint(5, 11), since that matches the minimum and maximum values exactly.
upvoted 0 times
...
Catina
5 months ago
Hmm, the legend and title don't seem relevant to the Y-axis, so I'm leaning towards either A or B. I'll make my best guess and move on.
upvoted 0 times
...

Save Cancel