Is there a way to restore deleted leads?

User deleted several leads that should not have been deleted - is there a way to recover them.  As an example, SalesForce.com has a wastebasket area where deleted records can be restored.  Anything like this in Sugar?

  • Hi Robert,

    Sugar does not have a native utility to restore deleted records, and the only way that can be achieved is through the database. If you are hosted in SugarCloud, then I recommend opening a support case with Sugar or your partner. Please let me know if you are hosted on-site and have direct database access, and I can walk you through the process to restore the deleted records.

  • If a user deleted them only via the Graphical User Interface, then all it did was set a deleted flag to 1 in the database (aka soft-deleting). Depending on your database clean-up schedule, those records may still exist in the database, you simply need to do a query like:

    UPDATE leads SET deleted = 0 WHERE <condition>;

    Where <condition> in your query would depend on you knowing some condition that can figure out what records are missing.

    However, if the clean-up schedule to delete 'soft-deleted records' has already been ran since, then your only option would be to restore the data from a backup.

  • ... and be aware that all relationships between the deleted leads and other objects (meetings, calls, email,...) are softdeleted too.

    Harald Kuske
    Principal Solution Architect – Professional Services, EMEA
    hkuske@sugarcrm.com
    SugarCRM Deutschland GmbH