I would if someone could give me some advice please...
As part of the upcoming GDPR changes my company has imposed a data retention policy of one month meaning that we're not permitted to keep information that's greater than a month old.
On two of the sites (a version 7 and a version 4 build) I'm running Umbraco Contour and I've been asked if a schedule could be created that deletes form entries that are greater than a month old.
So 2 questions really does anyone have any knowledge of programmatically removing form entries and what would be the best way of creating a scheduled task to fire this programmatic solution.
I've created a scheduled task that runs on a server that fires a web page which runs code when loaded but any sort of browser 'issue' (i.e. Internet Explorer didn't shut down properly) causes the schedule task to fail so this solution is unstable for this request really.
I'm not sure if this will help but we run a sql script shown below that clears our form entries from the previous 14 days. The script is run daily via a schedule. You can amend it to do previous 28 days by just changing the 14 to 28 if you need to delete last calendar month then you will need to add some code work that out.
Delete
FROM [dbname].[dbo].[UFRecords]
Where Created < GETDATE() -14
Programmatically remove Contour Form entries
Hi,
I would if someone could give me some advice please...
As part of the upcoming GDPR changes my company has imposed a data retention policy of one month meaning that we're not permitted to keep information that's greater than a month old.
On two of the sites (a version 7 and a version 4 build) I'm running Umbraco Contour and I've been asked if a schedule could be created that deletes form entries that are greater than a month old.
So 2 questions really does anyone have any knowledge of programmatically removing form entries and what would be the best way of creating a scheduled task to fire this programmatic solution.
I've created a scheduled task that runs on a server that fires a web page which runs code when loaded but any sort of browser 'issue' (i.e. Internet Explorer didn't shut down properly) causes the schedule task to fail so this solution is unstable for this request really.
Thanks in advance, C
I'm not sure if this will help but we run a sql script shown below that clears our form entries from the previous 14 days. The script is run daily via a schedule. You can amend it to do previous 28 days by just changing the 14 to 28 if you need to delete last calendar month then you will need to add some code work that out.
Delete FROM [dbname].[dbo].[UFRecords] Where Created < GETDATE() -14
Hope that helps
Bal
Hi Balram,
So just to confirm this deletes Contour records from the last 14 days??
If that's the case then that's awesome work!
Thanks, C
Hi Craig
Yes this is what we are using to clear down our form entries.
Bal
That's brilliant thanks for your time
:)
So would this just delete all of the entries?
Delete FROM [dbname].[dbo].[UFRecords]
Hi Amir
yes it would
Bal
is working on a reply...