Get Deleted records

Collapse
X
 
  • Time
  • Show
Clear All
new posts

  • tothewine
    replied
    Originally posted by Oleksii S.
    Hello all,
    a question related to the topic - how to catch a Restore Record event by formula or Process?
    Or select records which have been restored?
    Or at least to mark the deleting record in time of deletion (to utilize in case it would be restored)?
    I don't know if espo updates the modifiedAt field when deleting but if you customize the server code there should be a deletion event available.

    Leave a comment:


  • Oleksii S.
    replied
    Hello all,
    a question related to the topic - how to catch a Restore Record event by formula or Process?
    Or select records which have been restored?
    Or at least to mark the deleting record in time of deletion (to utilize in case it would be restored)?

    Leave a comment:


  • esforim
    commented on 's reply
    Thank you. I guess for now I just increase the days.

  • Maximus
    replied
    > Does setting it to "0" disable it?

    No, there is no such ability. You can redefine the logic from the file /application/Espo/Jobs/Cleanup.php in the Custom directory by disabling this Job from the Run() function.

    > Not sure but is this the job that does that clean: Scheduled Jobs > Clean-up?
    > Does it do other cleaning as well or just ActionHistory I wonder?

    Yes, Clean-up runs this process and many others. Please investigate this file /application/Espo/Jobs/Cleanup.php




    Leave a comment:


  • esforim
    replied
    Originally posted by Maximus
    Note. The cleanupActionHistoryPeriod by default is 15 days, so you won't be able to get these records with this way after this time (see the 'cleanupActionHistoryPeriod' parameter in the /data/config.php file).
    Didn't know this, time to activate it.

    Does setting it to "0" disable it?

    Not sure but is this the job that does that clean: Scheduled Jobs > Clean-up

    Does it do other cleaning as well or just ActionHistory I wonder?
    Last edited by esforim; 08-12-2020, 04:10 AM.

    Leave a comment:


  • Oleksii S.
    replied
    Thus, "It's possible to delete the record with the formula expression: deleted = 1."
    But at the same time, it is impossible to undelete the record with the formula expression deleted=0, due to the design, am I right?

    Leave a comment:


  • Oleksii S.
    commented on 's reply
    A-ha, now I see it, thanks Would try to dig in this ActionHistoryRecord through API, then.

  • Maximus
    replied
    Hi folks.
    For those EspoCRM users who are using not cloud instance, there is a possibility to activate the Action History Record entity for Report (required json file code change). Due to this, you might fetch a list of deleted records (see screenshot).

    Note. The cleanupActionHistoryPeriod by default is 15 days, so you won't be able to get these records with this way after this time (see the 'cleanupActionHistoryPeriod' parameter in the /data/config.php file).



    Attached Files

    Leave a comment:


  • esforim
    replied
    Oh I see what you mean, haha. No it not backdoor way, it is only available to the Administration. I posted that URL to make it easier.

    If you go into "Administration > Action History" you will see it.

    I never logged in as non-administration so not sure if standard Users can access it using Role/Team.

    Leave a comment:


  • Oleksii S.
    replied
    Originally posted by espcrm
    I'm sure /#ActionHistoryRecord/ is available for cloud user, make no sense that it is blocked.
    How did you access that Mona Mary record? (aside from copying the URL before deleting it)
    Exactly. This "backdoor" way. Just looking for the "front" one.
    #ActionHistoryRecord is absent in Entity Manager, what is not far from "blocked".

    Leave a comment:


  • esforim
    replied
    I'm sure /#ActionHistoryRecord/ is available for cloud user, make no sense that it is blocked.

    How did you access that Mona Mary record? (aside from copying the URL before deleting it)

    Leave a comment:


  • Oleksii S.
    replied
    Well, part of the function appeared to exist..
    Anybody knows how works all the thing?
    Click image for larger version

Name:	Image 08-05-15_22.jpg
Views:	1734
Size:	31.4 KB
ID:	61208

    Leave a comment:


  • Oleksii S.
    replied
    Thanks. Unfortunately, all these means are not for the cloud instance, I see. Oddly.

    Leave a comment:


  • Nishan Perera
    commented on 's reply
    Best thing is to do is get the data from the db.

  • telecastg
    replied
    I don't know of any basic Espo version GUI method to do it, maybe with reports or workflows ? (I don't use the advanced pack so I can't tell).

    However, if you are willing to use other methods, that can easily be done using myPhpAdmin.

    Expo db tables contain a field "deleted" that when set to "1" makes the record appear as "deleted" for Espo, even though it will remain in the database until Espo does a "clean out" as specified in your preferences, so just run a simple select query on the table that you need.

    Leave a comment:

Working...