I'm wanting to delete the entries from Umbraco Forms with the attachments that are 30 days or older, but cannot find any clear documentation on how I can get a list of all (not root/folder, but all existing) forms in Umbraco to iterate trough to get the records.
My plan was to get all older records and delete them per form in a scheduled task. Anyone got an idea on how to get the complete form list in dotnetcore to use in an scheduled list?
Thanks for the reply. I've seend the documentation allready and there is no option for getting all the forms back as objects, or how to delete them with attachments.
The options given in the documentation are only usable if you know which pages your Forms are on (per pageid) or if you know the name/guid of the form it self (formguid/id).
There is apparently no option in code/library to get all the forms back as a list. For GDPR the need is that all record data from all forms older then 30 days is deleted including attachments.
I have seen older solutions to delete them straight from the database, but we would like to keep it in a schedular with logging instead of stored procedures and/or database deletion scripts.
Apparently the need to develop an scheduled task to remove records has been removed with the new functionalities that are added on the latest forms settings/config options:
Yes, it seems it does need some extra settings though. I'm currently testing the solution.
I haven't had succes yet with getting this to work locally, so I'm testing this on a cloud-server:
Edit; It seems to work:
The new version of Forms (10.2.x) can be set the appsettings. They are only applied new forms. The current ones need to be set in the newly added settings so you can configure per form how long the data needs to be saved.
Umbraco Forms - List of all Forms
I'm wanting to delete the entries from Umbraco Forms with the attachments that are 30 days or older, but cannot find any clear documentation on how I can get a list of all (not root/folder, but all existing) forms in Umbraco to iterate trough to get the records.
My plan was to get all older records and delete them per form in a scheduled task. Anyone got an idea on how to get the complete form list in dotnetcore to use in an scheduled list?
I believe you can find it here https://our.umbraco.com/documentation/Add-ons/UmbracoForms/Developer/Working-With-Data/ or https://our.umbraco.com/documentation/Add-ons/UmbracoForms/Developer/AjaxForms/
Hi Yakov,
Thanks for the reply. I've seend the documentation allready and there is no option for getting all the forms back as objects, or how to delete them with attachments.
The options given in the documentation are only usable if you know which pages your Forms are on (per pageid) or if you know the name/guid of the form it self (formguid/id).
There is apparently no option in code/library to get all the forms back as a list. For GDPR the need is that all record data from all forms older then 30 days is deleted including attachments.
I have seen older solutions to delete them straight from the database, but we would like to keep it in a schedular with logging instead of stored procedures and/or database deletion scripts.
Apparently the need to develop an scheduled task to remove records has been removed with the new functionalities that are added on the latest forms settings/config options:
https://docs.umbraco.com/umbraco-forms/developer/configuration
See the options: DaysToRetainSubmittedRecordsFor DaysToRetainApprovedRecordsFor
I'm going to test out if these options also remove the attachments associated with the entries/records.
Looks like a very useful feature
Looks like it contains also a timer for the schedule
Yes, it seems it does need some extra settings though. I'm currently testing the solution.
I haven't had succes yet with getting this to work locally, so I'm testing this on a cloud-server:
Edit; It seems to work: The new version of Forms (10.2.x) can be set the appsettings. They are only applied new forms. The current ones need to be set in the newly added settings so you can configure per form how long the data needs to be saved.
So no more support needed, all works now!
is working on a reply...