With the below formula, the error mesage comes up if that case has been closed for more than 7 days, which is working as expected. But, I am still able to make edits to other fields on the case without changing the status to 'Reopened' / reopening the case.
AND(
IsClosed = TRUE,
$Permission.OverrideValidationRules = FALSE,
NOT(ProcessBuilderOverrideValidation__c ),
(TODAY() - DATEVALUE(ClosedDate) >= 7),
AND(
$RecordType.Name=$Label.GeneralCaseRecordTypeLabel,
NOT(ISCHANGED(Status))
),
)
So to be clear, what I want is for the validation rule to fire if a user tries to save the changes to the case without updating the status to 'Reopened' or if the case has been closed for more than 7 days. The 7 days part works fine but the changing status part does not, I can edit any field with the status as 'Resolved' and save these changes, but I don't want that to be the case
5 answers
Hi Daragh,
2 validation rules may be easier. It's hard to fix the rule without knowing if any of it works at all. I see a lot of conditions I don't know about, ie record types, some fields that should change, etc...
So, my best guess is this, you'll need to add the extra conditions as needed as I can't know with the little info you gave me:
AND(
$Permission.OverrideValidationRules = FALSE,
NOT(ProcessBuilderOverrideValidation__c ),
NOT(ISCHANGED( DelayEntitlementClose__c )),
PRIORVALUE(IsClosed),
ISCHANGED(Status),
OR(
TODAY() - DATEVALUE(ClosedDate) >= 7,
TEXT(Status)<>'Reopened' ))