Skip to main content
Solved

Is it safe to Clean SMEmail table in Database, because Emails can NOT be truly deleted from Screen.

  • May 18, 2023 3:40 AM UTC
  • 5 replies
  • 409 views
  • Translate All

Forum|alt.badge.img+6

Hello,

      We use Acumatica to send emails often, and the outing going emails are actually not needed. It takes me a lot time and effort to delete them twice on screen “All emails” CO409070.     

      But I happened to find these records, even if I have clicked delete twice on screen to delete(first time make processed to deleted, second time makes it disappeared from screen.)

          The table space usage are NOT actually reduced. 
Because it is still in DB, just with “DeletedDatabaseRecord =1 ”.

        I am not quite understand why this is designed this way. My question is,  if we just 
Delete * from SMEmail where CreatedDateTime <='2022-09-30 20:30:55.027' and DeletedDatabaseRecord =1 .  
      Would it be OK?

Best answer by ray20

To whom also be interested, I have tried in both test and production environment,
If I run 
Delete * from SMEmail where CreatedDateTime <='2022-09-30 20:30:55.027' and DeletedDatabaseRecord =1 .
It looks like no issue be brought in.  
But please keep in mind, you should be extremely careful to run this script and better with fully data backup. 

View original

5 replies

Forum|alt.badge.img+6
  • Author
  • Captain II
  • Answer
  • Jun 6, 2023 12:46 AM UTC

To whom also be interested, I have tried in both test and production environment,
If I run 
Delete * from SMEmail where CreatedDateTime <='2022-09-30 20:30:55.027' and DeletedDatabaseRecord =1 .
It looks like no issue be brought in.  
But please keep in mind, you should be extremely careful to run this script and better with fully data backup. 

Translate

Chris Hackett
Community Manager
Forum|alt.badge.img
  • Acumatica Community Manager
  • Jun 6, 2023 2:16 AM UTC

Thank you for sharing your solution with the community @ray20 !

Translate

nhorvathNAW
Freshman II
Forum|alt.badge.img
  • Freshman II
  • Oct 25, 2024 2:12 PM UTC

To whom also be interested, I have tried in both test and production environment,
If I run 
Delete * from SMEmail where CreatedDateTime <='2022-09-30 20:30:55.027' and DeletedDatabaseRecord =1 .
It looks like no issue be brought in.  
But please keep in mind, you should be extremely careful to run this script and better with fully data backup. 

Hey @ray20, what about all the file attachments? Won’t those remain behind?

 

I came across this post and the scripts in the replies:

 

Clear Email Queue | Community

 

 

Translate

ramuv9
Jr Varsity III
Forum|alt.badge.img
  • Jr Varsity III
  • Jan 15, 2025 11:00 AM UTC

Hi ​@ray20 

Yes, you can delete this table able it won't cause any problems.

Translate

Forum|alt.badge.img
  • Acumatica Employee
  • Jan 21, 2025 10:31 PM UTC

Hi ​@nhorvathNAW The files would remain, there is a different script to delete upload files

Translate