I have a VisualForce page that has a custom object as a standard controller (let's call it
Custom_Object__c). This page is accessible to the public without having to sign in with any special credentials. The page has a form that allows any user with a link to the form to enter information and submit, thereby updating the record on
Now, suppose the record is deleted. The user still has the link to the form for that particular record, but when they try to access the form after the record is deleted, they would get a "Data Not Available" message (a Salesforce message). Is there a way to override this to show a custom (i.e. more friendly) VisualForce page? Ideally I would want to use the same VisualForce page as the form, with a div that is conditionally shown if the record no longer exists (and also conditionally hides the form).