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
Kyrylo ShepetkoKyrylo Shepetko 

Recover VF Page

Hi All, 
Somebody deleted a VF Page in Our Org that affectes critical business process. Therefore, we need to: 
1. Recover VF Page ASAP (please let me know what we need for this)
2. Identify who and when deleted this VF Page. 

Please let me know should you have any questions! 
Thank you! 
 
Sandeep PatwardhanSandeep Patwardhan
You can use the Metadata API to download your org's source and related metadata.
Also you can contact SF Support to see if they can help you out.
debdubdebdub
Hello Kyrylo,
Do you have a sandbox cloned from your Production org?  If so, you should be able to recover the page from there and move it to Production using a Change Set.  If you are using the Force.com IDE (or someone on your team is), you may have a local copy available as well.  

Once that is sorted, I would recommend setting up source control for your customizations.

As to identifying who deleted it and when, I am not sure how to tell but I'm sure others will chime in.
Jerun JoseJerun Jose
Hi Kyrylo,

Unfortunately, it is not possible to recover deleted VF or Apex components. You could try raising a ticket with Salesforce to see if they can help.
This is one of the key reasons to use proper source control mechanisms. A simple way that I use is to use the workbench to download a zip file of all code components at the start of the day and keep them as a local backup - takes about 2 mins.

As for identifying the person, you can use the setup audit trail to find that. Navigate to Setup --> Security Controls --> View Setup Audit Trail. This will tell you who and when this page was deleted.
Jerun JoseJerun Jose
Also note that it might just be a case of the page being renamed.
Kyrylo ShepetkoKyrylo Shepetko
Thank you all for you replies. 
Yes, we would need to re-create the Page from one of the Sandboxes. However, I was hoping that there is aquicker way to do this. 
Unfortunately there is no info about deletion of VF page in Audit trial logs. And Salesforce support only redirected me to creation of this topic on Community, cause we don't have Premier support option.

Again, thanks to all for your help.