You need to sign in to do that
Don't have an account?
Rquiring Case Reason upon closing a Case
Earlier, we implemented a custom button to close Case on the Case Details page, instead of using the standard Close Case Page Layout. Now we're faced with a challenge: we want to make the Case Reason required *only* upon Case closure. Here's what I've tried so far:
Build a validation rule to look for Status = Closed and Case Reason = null; if the condition is true, throws an error message saying 'Case Reason is required'. Here's the error formula:
Error Condition FormulaAND(ISPICKVAL (Reason, ""),
ISPICKVAL(PriorValue(Status), "In Progress"),
ISPICKVAL (Status, "Closed"))
The validation rule works but the problem is it first re-directs to the standard Case Close page and gives the error there, instead of giving the error on the Case Details page.
Making the Case Reason a required field won't work either b/c we only want to force data input upon closure.
Is there a solution to this? thanks.
Could you please share the details of how you implemented the custom button as it would help in figuring out the solution to your current problem with the validation.
Hi, it's done as a button using S-control and here's the code. Thanks in advance.
<!-- begin code -->
<!-- replace 'Closed' (without quotes) in the code below with the Status desired for case closure -->
<html>
<head>
<script src="/soap/ajax/8.0/connection.js"></script>
<script src="/desktop/desktopApi.js"></script>
<script>
function init() {
var desktop = new DesktopApi();
if (desktop.desktopPageWindow)
{
window.parent.location.href = "/{!Case.Id}/s?save=1¬ifyContact=0&cas7=Closed&​isdtp=mn&nooverride=1&retURL=/{!Case.Id}";
} else {
window.parent.location.href = "/{!Case.Id}/s?save=1¬ifyContact=1&cas7=Closed&​nooverride=1&retURL=/{!Case.Id}";
}
}
</script>
</head>
<body onload="init()">
<p> </p>
</body>
</html>
<!-- end code -->