Hi, I´d like to delete all posts from a specified XForm. Is this possible through code? I see it´s done in the Form-data tab in Edit-mode, so it should be possible...
Thanks.
Hello!
In EPiServer 4.60 there are some improvements to the XForm-classes that makes this quite easy. First of all, the XForm class has got a new method, GetPostedData, with a couple of overloads to list posted data. This method returns an IList containing XFormData objects. The XFormData object has a Delete method that makes it easy to delete the posts.
If you have to do this in EPiServer 4.51 I'd recomend having a look at the following undocumented classes:
EPiServer.DataAccess.XFormStatisticsDB
EPiServer.Util.XFormselper