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 questionsA 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.
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.
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.
Keep practicing
Take the free DATA-ARCHITECT practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other DATA-ARCHITECT practice questions
- Question 1Which three characteristics of a skinny table help improve report and query performance?
- Question 2Universal Containers (UC) has built a custom application on Salesforce to help track ship…
- Question 3Universal Containers (UC) has lead assignment rules to assign leads to owners. Leads not …
- Question 4Universal Container (UC) has accumulated data over years and has never deleted data from …
- Question 5Universals Containers’ system administrators have been complaining that they are not able…
- Question 6Universal Containers is experiencing frequent and persistent group membership locking iss…
