Find your content:

Search form

You are here

can't undelete record

 
Share

I have tried to undelete a record, both in the Recycle Bin UI and via apex.

The UI message is cryptic (4 potential explanations), but the apex debug gives me the following:

DEBUG|Undelete failed. First exception on row 0 with id a0N3000000AfFu8EAF; first error: UNDELETE_FAILED, This object was part of an entity whose definition has been deleted.: []

I have millions of these records, and the object is NOT deleted.

Anyone seen this before? I'd love to have my record back!


Attribution to: Shane McLaughlin

Possible Suggestion/Solution #1

Did you try to :

  1. Query your records with IsDeleted = True ALL ROWS
  2. Export your records through DataLoader with Delete = true?

Somehow, your schema has been changed and it doesn't match with your deleted records anymore. For example, if you added a required field or a unique field in your object after having deleted your records. The thing to do is to try to replicate how your object was before:

  • Make your fields not required
  • Make your fields not unique
  • Recreate any fields your might deleted.
  • ...

There is manipulations to do and you should be able to achieve this if you know your data model.

Good luck.


Attribution to: Cloud Ninja

Possible Suggestion/Solution #2

According to my knowledge, This issue was fixed in spring release.

Reason: Recycle bin is not usable when a truncated entity gets assigned to a keyprefix that was the old keyprefix of a previously truncated entity

Steps to reproduce:

1> create custom entity A(a00), B(a01) and C(a02).

2> truncate A and B

3> erase the soft deleted A_trunc1 and B_trunc1

4> truncate C Notice C gets assigned the prefix a00

now create a record for C and delete it the record cannot be found in recycle bin

If you still see the issue, a temporary workaround is to manually export the data using WORKBENCH. use the checkbox to include deleted+ archived records and export the data which you need and import them back into salesforce.


Attribution to: varun guruvugari
This content is remixed from stackoverflow or stackexchange. Please visit https://salesforce.stackexchange.com/questions/33393

My Block Status

My Block Content