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
Cathie DonohueCathie Donohue 

I would like to be able to have an error pop up when a user tries to close a case

 I would like to be able to have an error pop up when a user tries to close a case when there are open acitivities. Standard case validation rules can't be written due to the Activity object being a child object.  Can someone help use out with an apex trigger?
Gaurav NirwalGaurav Nirwal
You can create custom HTML homepage components. (SETUP > HOME > COMPONENTS). I have never tried to put complex java script code in there, but it's worth a shot. Just get the code for a pop up/splash screen somewhere online (google will help) and try to put that code in the HTML component (make sure you switch to html view before adding the code).

If that doesn't work, plan B is to create a custom homepage using visual force. In your visualforce page you would be able to add any code (javascript, ...) you want. Plan B is a last resort as there is much more overhead with this solution ...

Create a new visualforce page
Create a custom tab called "Home" for example
Remove the default Home tab from what users can see
Finally, add your new  tab to Salesforce and make it the default tab for users