Show answerHide answer
Correct answer: B Set field-level error message to display on the page.
Explanation
Explanation:✅ Correct Option: B
A field-level error message provides immediate, contextual feedback when a validation rule fails. It is the simplest and most user-friendly method as it clearly identifies the erroneous field and explains the exact format requirement right where the error occurs, preventing save attempts and guiding correction efficiently.
❌ Incorrect Option: A
In-App Guidance is a proactive tool for prompting or training users on how to use a feature. It is not designed for reactive validation of specific data formats and cannot prevent a record from being saved, making it an ineffective solution for this requirement.
❌ Incorrect Option: C
Marking the field as required only ensures it is not blank. It does not validate the format or number of digits of the phone number, allowing incorrectly formatted data to be saved, which fails to meet the specific business rule.
Summary:
The goal is to enforce a specific data format and provide a simple, error-preventing user experience. A validation rule with a field-level error message is the standard, targeted solution for validating input format and providing instant feedback upon failure.
Reference:
Salesforce Help: Define Validation Rules