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
stephbstephb 

Validation rule to close case depantant on status

I am need of creating a validation rule that automatically closes a case when case status is set to "T1:Closed and T2:Closed.

They also want to see the close case layout page so they can input their reason to close. (This is the page that you see when you click on the close case button within the case tab). 
Pankaj_GanwaniPankaj_Ganwani
Hi,

To accomplish above requirement we will have to use workflow rule instead of validation rule. The rule evaluation criteria would be 'created, and any time it’s edited to subsequently meet criteria'. 

To show the different page layouts to the users, you will have to create a recordtype with the close case page layout.

There will be 2 workflow field update actions:

1. For status, which change the status from open to Close.
2. For Record Type, which change the record type to close case record type.
stephbstephb
Where do i go to create the record type this is what I am seeing. 

User-added image
Pankaj_GanwaniPankaj_Ganwani
Hi,

For creating Case record type, you will have to create a support process. Create a dummy support process for now and then click on the record type link under Case section from the side bar. You will be able to create the record type then.
stephbstephb
I'm not seeing the closed case page layout User-added image
Pankaj_GanwaniPankaj_Ganwani
Hi,

Sorry for misguide you. Close case layout will not be visible to you so you can't create the record type by assigning this layout. Also, for entering the case reasons user will have to go to Case edit page to write the reasons. The close case layout will only be visible when user clicks on close case button on Case detail page.

I think the 'Closed' value will not be visible as option in status picklist, so you will have to go to 'support settings' within Case in side bar and enable 'Show Closed Statuses in Case Status Field' permission.

What you can do now, simply create a workflow with only 1 field update ie. status change and try with it.