Been trying to create Workflow Type and at the end of the workflow I need to remove / delete the record data / form data. The rest of the code works, but breaks when I try to add in the delete codes which I've got from the Umbraco documentation.
I've tried
RecordService.Instance.Delete(record, e.Form);
And
var recordService = new RecordService();
recordService.Delete(e.Record, e.Form);
And they both ended up with the below error
"Object reference not set to an instance of an object." at Umbraco.Forms.Data.Storage.RecordFieldStorage.GetAllRecordFields(Record record, Form form)\r\n at Umbraco.Forms.Data.Storage.RecordStorage.GetRecord(Object id, Form form)\r\n at Umbraco.Forms.Core.Services.WorkflowService.ExecuteWorkflows(List`1 ...
Any idea?
I've even tried the below
using (RecordStorage recordStorage = new RecordStorage())
recordStorage.DeleteRecord(record, e.Form);
Umbraco forms RecordService delete is returning error
Hi All,
Been trying to create Workflow Type and at the end of the workflow I need to remove / delete the record data / form data. The rest of the code works, but breaks when I try to add in the delete codes which I've got from the Umbraco documentation.
I've tried
And
And they both ended up with the below error
Any idea?
I've even tried the below
Hi JLon,
I was thinking if you have been hit by this issue - http://issues.umbraco.org/issue/CON-1344 ?
If so could you please try upgrade your Umbraco Forms by using this set of files https://umbraconightlies.blob.core.windows.net/umbraco-forms-nightlies/UmbracoForms.Files.6.0.3-alpha-20170815-001.zip. and follow this documentation https://our.umbraco.org/documentation/Add-ons/UmbracoForms/Installation/ManualUpgrade
Please make sure to take a backup of your umbraco site and database before you are doing this so you can roll back if something unexpected happens.
Hope this helps,
/Dennis
is working on a reply...