November Happy Hour will be moved to Thursday December 5th.

Not able to delete form submissions from code

Vote:
 

Hi!

This week we upgraded to Episerver 11 update 202 and Forms 4.10.0. After this upgrade we are not able to delete form submissions from code anymore.

We are using the DdsPermanentStorage.Delete method like this: Delete(formIdentity, submission.Id);

Before upgrading to Forms 4.10.0 this worked fine and the actual form submission was deleted like we wanted, but after the upgrade this code seems to do nothing.

All form submissions are still there and no exception is thrown either.

Any ideas why this doesn´t work anymore?

#188654
Feb 28, 2018 15:02
Vote:
 

Is it working when you delete submission from build-in Forms Submission view? Here is how we delete the submissions:

var formIden = new FormIdentity { Guid = content.ContentGuid };
var submissionStorage = _submissionStorageFactory.Service.GetStorage<PermanentStorage>(); 
_formDataRepository.Service.DeleteSubmissionData(submissionStorage, formIden, submissionIds);
#188687
Mar 01, 2018 8:02
Vote:
 

Thanks for your answer.

I solved it by clearing submission data like this:

submission.Data.Clear();
SaveToStorage(formIdentity, submission);

#188693
Mar 01, 2018 10:31
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.