0

my requirement is : When case status is Approved or Rejected , then not possible to re-open the case and show alert like "Approved / Rejected cases not possible to open...." How can we acheive through Validation rule ? I tried below code but not works:

AND(
    TEXT( Status ) = "Approved",
    OR(
        TEXT(Status ) = "Rejected")
    )

pls correct or give any suggestions...Thanks

  • Welcome to SFSE! Please take the tour and read How to Ask. This site isn't a free coding service, but rather one focused on helping people become better admins/developers by overcoming specific problems. If you've tried to write a validation rule to achieve this, you should edit your question to include what you've tried so far. If you're getting an error message, providing the full text of the error (don't paraphrase it!) is helpful. If you're new to Salesforce, or just a feature (like validation rules), then trailhead.salesforce.com is where you should start your learning journey. – Derek F Sep 18 at 14:26
0

You could create a validation rule like below:

OR(
   TEXT(PRIORVALUE(Status)) = 'Approved',
   TEXT(PRIORVALUE(Status)) = 'Rejected'
)

Then just add your "Error Message" as: "Approved / Rejected cases not possible to open"

I would change the "Error Location" to Field and select "Status".

Keep in mind that this VR would apply to EVERY user, including Admins. If you would like to eliminate Admins or any Profile, that would need to be included in the VR as well. Let me know if that's the case.

  • Thank you Rodrigo....Appreciated – Sekhar Sep 18 at 17:45
  • @Sekhar, if that solved your question, please make sure you accept the answer as correct, as it may help other users as well. Thanks. – Rodrigo Sep 18 at 19:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.