You need to sign in to do that
Don't have an account?
kurtz_wolfgang_pre
Sharing Records in Recycle Bin
Hello SFDC Gurus,
This is out of curiosity. Does recycle bin store the sharing records? I don't think so, however Salesforce support informed us to pull the sharing records from recycle bin. Can somebody shed some light on this matter? I would greatly appreciate your input on this.
Thanks,
K
Very good question.
A quick test seems to bear out that the actual share records are there. I created an account, manually shared the account, then restored the account, which then restored the share record. If they weren't in the recycle bin, we could not restore them.
Another clue that the sharing objects (AccountShare, ContactShare, Custom_Object__Share, etc.) support recycle bin functionality is the presence of an IsDeleted field.
Clearly the UI does not show the share records in the recycle bin, but I'm guessing support is suggesting you use an API tool to retrieve the share records. Nice idea, and I thought I would give it a go. I would have expected it to work, and came up with this:
Unfortunately, I got an error:
That was surprising. I need to do some research about that, but fundamentally, the answer to your question is, "yes" they are in the recycle bin. But can you get to them? It does not appear so. If you want to restore them, restore their parent records.
All Answers
Salesforce supports to store SObject's record in recycle Bin no matter it is shared or not.
Thanks Sandeep for your prompt response. However I didn't mean shared record. I need to actually specify more details about the question.
Contact records will have sharing information in ContactShare object. If I delete a contact record, it will end up in recycle bin, will the ContactShare records for that particular Contact record also be stored in Recycle bin?
Very good question.
A quick test seems to bear out that the actual share records are there. I created an account, manually shared the account, then restored the account, which then restored the share record. If they weren't in the recycle bin, we could not restore them.
Another clue that the sharing objects (AccountShare, ContactShare, Custom_Object__Share, etc.) support recycle bin functionality is the presence of an IsDeleted field.
Clearly the UI does not show the share records in the recycle bin, but I'm guessing support is suggesting you use an API tool to retrieve the share records. Nice idea, and I thought I would give it a go. I would have expected it to work, and came up with this:
Unfortunately, I got an error:
That was surprising. I need to do some research about that, but fundamentally, the answer to your question is, "yes" they are in the recycle bin. But can you get to them? It does not appear so. If you want to restore them, restore their parent records.
Thanks a lot PJCloud for the detailed explanation and the effort that you took for it. I will mark it as a solution and close this. Appreciate everybody for taking a look at this question.