Timer_To_Delete_Data_Daily_30Days_Old
Application Type
Traditional Web

Hello Team,

Mater Entity having date to verify record is older than 30 days from todays date. Having no of slave(child) entities. But here i am not deleting data from main (master) entity just referring date to verify its older than 30 days.
Everyday unnecessary i am fetching all data does not matter its processed yesterday or not. Because i am not deleting that record or maintaining any flag for records which are already processed.

Kindly suggest the best approach. 

Thanks,

Pradip Chavhan.  

You can set up a Timer in your Processes tab and set it to run when you decide. This Timer will wake the process and kick it off from the Server, no human interaction is needed.

Sample date based delete.

Don't forget to convert your DateTime (CurrDate()) to Date using data conversion built-in functions as illustrated above. Then, AddDays(CurrDate(), -30) Will give you (roughly) all records over a month old. You could also just filter within the aggregate as in:
This will ensure that your aggregate only has records that are over 30 days old within it when the timer activates. Depending on the amount of records you will be purging, you may want to add a Timeout catch within your logic to handle environmental hiccups or connection time outs.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.