Home > Forum > Tips&Tricks > Delete WFelements

Delete WFelements
0

Hi
How can I trigger the deletion of a given WFelements element in my own action?
I know there is a delete button but you can only trigger it by standing on the form, I would like to trigger the deletion action as a cyclic action.
Thx
Maciej

MVP

Hi Maciej,
You could try archiving the document with 'Retention' set to 'Remove from content database', although it removes it without any possibility to bring it back.
If you are sure that users will know that it's not possible to bring it back, i'd consider using it, although most of the time i'm keeping a 'Cancelled' step in the workflow, with 'Go back' path for those 'undo my mistake please' moments.


*https://docs.webcon.com/docs/2025R2/Guides/Archiving/

MVP

There are two things I want to add to Maks answer.

1. Make sure you have defined night hours. Otherwise they won’t be deleted if you choose to delete them during the night.
2. The retention feature is not part of WEBCONAPPS. You can use the REST API as a fallback.


We are also using a cyclical action to clean up „technical“ workflows after a certain timeframe.

Best regards,
Daniel

Did you know that with WEBCON you can automate virtually any process? Even baking cookies 🍪
 
Speaking of cookies: we use the ones that are essential for our website to function properly, as well as additional ones that help us customize our content to your preferences. If you don’t mind cookies, click Accept. If you want to learn more, explore settings.
Settings