Soft Data Validation

Q: How might I validate a record but still allow it to save if it fails?

A: I use a little bit of formula-field sneakiness.

Let’s say you’re a consultancy and you’ve got three project-related dates on an Opportunity (Close Date, Implementation Date, Go-Live Date) that need to occur sequentially. Here’s what that output could look like:

To implement it, I suggest creating a Formula(Text) field named “Date Audit” like this:

IF(NOT(ISBLANK(Implementation_Date__c)) &&
    Implementation_Date__c <= CloseDate,
   "❌ Implementation Date Must Be Later than Close Date" & BR(),
   "") &
IF(NOT(ISBLANK(Go_Live_Date__c)) &&
    Go_Live_Date__c <= CloseDate,
   "❌ Go-Live Date Must Be Later than Close Date" & BR(),
   "") &
IF(NOT(ISBLANK(Implementation_Date__c)) &&
    NOT(ISBLANK(Go_Live_Date__c)) &&
    Go_Live_Date__c <= Implementation_Date__c,
   "❌ Go-Live Date Must Be Later than Implementation Date" & BR(),
   "")

Leave a comment