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

Close Case set Status field to Closed

Hello All,
When I close a case I want the Case Status field to update to Closed automatically. Any chance anyone can send me the code to create a New Close Case button that will do that or adjust the current one?
Erica KuhlErica Kuhl
I looked on the Developer Boards and found a thread that may help:

Let me know.

This one seems to be to close tasks when a case is closed. I am looking for when you click the Close Case button that it updates the status to closed. The example is great but I do not know how to apply to my needs :smileyhappy:
I need the exact code, coding for dummies!
Erica KuhlErica Kuhl
Sorry about that - maybe it would be better to post on the Developer Boards for this question.  They are very active and will respond quickly.  Out of my range of expertise.  Here is the link:
That previous post shows how to make the button you want-

On a related note, does anyone know of a way to override the Save and Close button so that it skips the Closed Case screen and sets it straight to Closed?
That will be very helpful, thanks :smileyhappy:

This help article from salesforce sets values on the close case page and skips the close case page.

So I am trying to create this button attached is the code I used from an earlier post, however I get this error message;

Problem with the OnClick Java Script for this button or link

Expecting ';'

jakester,  Did you every figure out the Save & Close button override?