Recovering deleted records

Hi,

I'd like to ask a general question regarding best practices. In cases like when a client mistakenly deletes a record from any Sugar module, such as Accounts, what is the best way to go on about recovering it? Simply changing the record's deleted flag back to false using SQL seems like the most straightforward way, but what about the record's relationships? Do I have to set their flags back to false one by one? Or is recovering a deleted record not recommended at all?

Any insight on the matter would be appreciated.

Regards,

Samuel.

Parents Reply Children
  • I agree with as this is not an available feature in Sugar today. If the instance is hosted in SugarCloud, it's best to open a case with our Support team with the details of the record that was deleted so that they can try to do the restoration. If the instance is hosted on-site, the relationship deleted flags would all need to be restored based on the deleted record's ID and date modified. This is likely something that the database administrator would want to script if possible since it could be a very long manual process. 

    The Product Suggestion that Vincent shared is also associated with Enhancement Request 70073, but there is no expected timeline on this functionality at this time. 


    Alex Nassi
    Digital CX Operations Director
    SugarCRM

  • For a simple deletion this could work. But mostly such deletions were created by more complex operations like  e.g. merging of records. In the merging case, the relationships are deleted between the existing parts and newly created with the new parts. That makes it nearly impossible to restore the old relationships.

    In an example I merged two contacts from one account to another account. The result in the accounts_contacts table looks like this and shows the problem to identify the changes:

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