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
Mike FitchMike Fitch 

Confirm Delete popup destination

I'm new to development and wanted to know how I would go about changing what page users are taken to when they click 'ok' on the confirm deletion popup window. I'm using the popup on a custom VF form I created and when 'ok' is clicked it takes users to the list view for the object the VF form was created for. I want users to be taken to the home page instead. If someone could guide me as to how i would begin to make that change i would appreciate it. Thanks.
Mike FitchMike Fitch
Here's the VF code i'm using now.

<apex:commandButton action="{!edit}"  value="Edit"/>
            <script type="text/javascript">
            function confirmDelete() {
            return confirm('Are you sure you want to delete?');
            }
            </script>
            <apex:commandButton action="{!delete}" value="Delete" onclick="if(!confirmDelete()) return false;" reRender="PrecallForm"/>