DATA-ARCHITECT practice question 8 of 35

Universal Container require all customers to provide either a phone number of an email address when registering for an account. What should the data architect use to ensure this requirement is met?

Full set: 257 questions
Answer options
A: validation Rule Correct answer
B: required Fields
C: Apex Class
D: Process Builder
Correct Answer:
A. validation Rule
Explanation

A validation rule is the ideal declarative tool for enforcing conditional data entry requirements. It can evaluate a formula before a record is saved and prevent the save operation if the formula returns "true". For this scenario, a formula such as AND(ISBLANK(Phone), ISBLANK(Email)) would effectively check if both fields are empty and display an error message, thus enforcing that at least one must be populated. This approach is efficient, maintainable, and aligns with the Salesforce best practice of using declarative solutions before resorting to code.

Why Incorrect

B. required Fields Making fields "required" at the field level would force users to enter both a phone number and an email, which contradicts the "either/or" requirement.
C. Apex Class An Apex trigger could enforce this logic, but it is unnecessary programmatic overhead. Salesforce best practices advocate for using declarative tools like validation rules first.
D. Process Builder Process Builder is designed to automate actions after a record is saved (e.g., create a task, send an email), not to validate data before it is saved.

References

1. Salesforce Help, Validation Rules. The documentation states, "Validation rules verify that the data a user enters in a record meets the standards you specify before the user can save the record."

2. Salesforce Help, Tips for Writing Validation Rules. This page provides examples, including a similar use case: "Ensure that a custom field called 'MyDatec' contains a date in the current year. YEAR(MyDatec) YEAR(TODAY())". This demonstrates the use of formulas for conditional checks.

3. Salesforce Trailhead, Formulas and Validations, "Write Validation Rules" unit. This module explains how to create validation rules to enforce conditional logic, which is the exact requirement of the question.

Scroll to Top