Salesforce Certified Platform Developer II — Question 112

An org has a requirement that an Account must always have one and only one Contact listed as Primary. So selecting one Contact will de-select any others. The client wants a checkbox on the Contact called 'Is Primary' to control this feature. The client also wants to ensure that the last name of every Contact is stored entirely in uppercase characters.
What is the optimal way to implement these requirements?

Answer options

Correct answer: D

Explanation

The correct answer is D because it consolidates the logic into a single trigger on the Contact object, which is efficient and easier to maintain. This approach allows for both Is Primary logic and last name formatting to be handled within one context, minimizing the risk of running into issues with multiple triggers. Options A, B, and C each involve separate triggers or rules that could lead to complexity and potential conflicts.