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
cjencjen 

Custom Detail Button with conditions validations popup

Hi, i need help creating a custom detail button on the case object. It need to only be clickable ar funcational when Case.Status = Assigned. If the user clicks on it and case status does not equal assigned, then it needs a pop up or something saying just that. If case status equals assigned, then would like the button to direct to another page "www.salesforce.com" (example)  and also a pop up that says, case has been processed.

If something like this doable?

Thanks, CJ
Best Answer chosen by cjen
sfdc newbiesfdc newbie
Have to use full Url
if ("{!Case.Status}" == "Assigned")
{
window.location = "http://www.salesforce.com/";
}

else
{
alert("Status is not Assigned");
}

All Answers

Sanjay Mulagada 11Sanjay Mulagada 11
if ("{!Case.Status}" == "Assigned")
{
window.location = "www.salesforce.com";
}

else
{
alert("Status is not Assigned");
}
sfdc newbiesfdc newbie
Have to use full Url
if ("{!Case.Status}" == "Assigned")
{
window.location = "http://www.salesforce.com/";
}

else
{
alert("Status is not Assigned");
}
This was selected as the best answer