Skip to main content
I'm trying to crerate a validation rule that prevents a user from updating a case that has been closed for more than 7 days or without changing the status to 'Reopened' i.e reopening the case.

 

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 risposte
  1. 14 gen 2020, 14:27
    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' ))

     

     
0/9000