0

I deleted a lightning component that I did not intend to delete? Is there any way I can get it back? Is there a backup or a recycle bin?

3 Answers 3

0

No. Once deleted, code is gone forever. For this reason, it is always recommended that you have a backup of your code. This includes Visualforce, Apex, Lightning components, Lightning Apps, Flows, and many other types of code and customization options.

1

Its actually not possible. Here is screenshot:

enter image description here

You can get Aura components by using SOQL:

List<AuraDefinitionBundle> adf = [
SELECT Id, DeveloperName, IsDeleted, MasterLabel 
FROM AuraDefinitionBundle 
WHERE DeveloperName='TestComp' ALL ROWS];
0

I had the same issue. Even though lightning cache is disabled the page still doesn't update sometimes. I have to continually crtl + shift + delete in chrome to bring up the delete cache menu over and over to ensure the changes are made in the Lightning Component. Well, guess what the command to delete a file in Developer Console is? ctrl + shift + delete. I developer fast, and I already have to wait for 20 second file saves using Salesforce's 1985 disk write speed. Horrible choice for a keyboard command to delete files in Developer Console when it's the same command in the browser that deletes cache files.

1
  • I will also add the server OwnBackup did help with this, as I was able to use that service to restore the file easily. Aug 6, 2020 at 4:51

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .