QuestionQ291

VerifiedData Management

DreamHouse Realty needs house showings to be scheduled within the current year to avoid too many future showings accumulating.

How can it ensure that Showing Date is populated only with a date in the current year?

Explanation

A Salesforce validation rule can enforce this requirement at save time by evaluating a formula such as YEAR(Showing_Date__c) <> YEAR(TODAY()) and displaying an error for dates outside the current year. Salesforce specifically documents this pattern for requiring a date field to be in the current year.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!