Skip to main content

One of my users accidentally deleted a document from a document folder.  Is there a way to restore a deleted document?  I checked the Recycle Bin, but it appears that it's only used to store deleted object records and not documents.

 

Thanks,

Greg

 

#Sales Cloud

4 个回答
  1. 2021年12月4日 22:56

    Hi,

     

    There are several ways of doing it

    For example:  

    Contact[] c = [select id from contact where isDeleted = true LIMIT 1000 ALL ROWS];

     As we are talking about files, you should add isDeleted to ContentDocumentLink  

    SELECT ContentDocumentId, LinkedEntityId  FROM ContentDocumentLink where LinkedEntityId: (Your linkedEntity ID) and LinkedEntity.Type= (Your LinkedEntityType)

    Use the Data Loader

    1. In the Data Loader, click Export All.
    2. Select the object and choose the target for export file. Click Next.
    3. Click Select all fields.
    4. Create filter 'IsDeleted' = True. Click Add Condition.
    5. Click Finish.
    6. Open the CSV file.

    details: https://developer.salesforce.com/forums/?id=9062I000000QyQcQAK

0/9000