function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
KpassKpass 

How to restrict editing Case fields when a Case is closed?

Is there a way to restrict editing the other case fields when a Case is in "closed" status; meaining you would have to reopen the Case to be able to edit the other Case fields??

Any help would be much appreciated.
pconpcon
You could just mark them as Read Only on the Closed Case page layout, or if you wanted to enforce it at the data layer, you could write a validation rule for each field that wouldn't allow them to be changed unless the status != closed
KpassKpass
Hi again pcon,

Can you give me an example of the validaton rule I would use to activate each field to not be edited when the status is closed.  Sorry, I am a newb....

Thanks!
James LoghryJames Loghry
Hi Kpass,

To piggy back off of pcon's comment, validation rules key off of the error condition.  In otherwords, if your validation rule formula evaluates to true, then the user will encounter a validation error.

The formula in a validation rule for detecting changes on the case Subject field when the Case is closed might look like the following:

AND(IsClosed,ISCHANGED(Subject))


Grazitti TeamGrazitti Team
Great , you want if any fields are changed then throw a validation error , so you need to accomplish this by following steps:
Create a field checkbox LockCase 
Create a workflow that runs when case is edited or created with rule criteria set as IsChanged(Status)
Update the Lockcase field with either true or false
Write a validation rule AND(isClosed,LockCase =TRUE)
let us know if you have any question .
please don't Forget to Mark this as your best answer if it works fine for you

Regards,
Grazitti Team
Web: www.grazitti.com

Matthew MorrisMatthew Morris
This is a situation where the use of a different record type and page layout may be appropriate.

When the case reaches a terminal stage and can no longer be editied us a workflow rule to change the record type to be "Closed Case" (or whatever name you choose to create).  You then have the benefit of being able to do 2 things.  You can have a new page layout with the fields either read only or omitted (you can also adjust the layout to be more suitale for readers who may browse it in future.  Morover you can use the record type to control view and edit permission.
If you needed to reopen the case, you could have a custom button to revert to the standard record type.

A bit more engineering here but it has the benefit of making it clear to the user that this is a closed case and not for editing.

HTH
KpassKpass
Thanks Matthew, I haven't had a chance to try any of the suggestions yet, but your suggested functionality would get me exactly what I am looking for. I will try it out! :)
Suraj Maharjan 3Suraj Maharjan 3
Easy workaround.
Create an Approval Process with entry criteria status is closed.
Auto approve if status is closed (this way the case is always auto approved)
Call the approval process with a process builder with criteria status is closed and changed.

This way everytime a case is closed, it will be auto approved and locked. Only Admins and designated managers will be able to unlock the record.
Mario BurgosMario Burgos
Hi, test a validation rule.
IF(
AND(
NOT(ISNEW()),
OR(
ISPICKVAL( PRIORVALUE(Status) , 'Closed'),
ISPICKVAL( PRIORVALUE(Status) , 'you status close')
)
), true, false)
Yogita Pitla 3Yogita Pitla 3

IF(ISNEW()), false, IF(ISPICKVAL( PRIORVALUE(Status) , 'Closed'), true, false))

Please try this. I have used this in the past.