How to delete the Empty Data present in the Backend of Hosted Project?

0
Dear Mendix Community,   We are currently working on a hosted project in Mendix and would like to know the best way to delete empty data entries from the backend. Could you please provide guidance on how this can be done?   If there are any specific steps or best practices to follow while performing this task, We would appreciate your input.   Thanks & Regards, IMTS Team
asked
2 answers
0

Hi Team,

 

Before deleting take database backup as best practice if any issue we can restore back also needed export the data as excel or csv. Then Create logics for deleting null values in microflow and trigger.

 

Hope it helps!

Thanks & Regards,

Manikandan K

answered
0

When you design your domain model it really helps to add "on delete" actions to your associations. This means when you delete the master object, it will delete any associated data as well.

 

https://docs.mendix.com/refguide/association-properties/#delete-behavior

 

Check with your client on their data retention policy. Data may need to be retained for a fixed period before automatic deletion. In this case, you can setup a scheduled event to run daily to look for entities over X days old and delete. If you have setup "on delete" actions on the associations this will also clean up associated data. It helps to make sure you have createdDate system member set on these entities so you know how old them are.

 

While testing it's useful to have delete functionality on some admin pages that only a developer or administrator user can see. 

 

Good luck!

answered