How add deleted event on Umbraco Forms admin side and It show only two work flows (Submit and OnApproved)

189 views Asked by At

I am unable to find deleted event or workflow in umbraco , umbraco forms. Basically I want to write some custom code and remove record on deleted event.

enter image description here

1

There are 1 answers

0
Mario Lopez On

As far as I know there is not a workflow for that. You have this custom workflow or you should create an event handler that listen the RecordDeleting or RecordDeleted events:

Umbraco.Forms.Data.Storage.RecordStorage.RecordDeleting += RecordStorage_RecordDeleting;

Umbraco.Forms.Web.Services.RecordService.RecordDeleted += RecordService_RecordDeleted;

private void RecordService_RecordDeleted(object sender, Umbraco.Forms.Core.RecordEventArgs e)
{
    //your code here
}

 private void RecordStorage_RecordDeleting(object sender, Umbraco.Forms.Core.RecordEventArgs e)
 {
    //your code here
 }