Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at

  • JLon 287 posts 397 karma points
    Aug 10, 2017 @ 14:41

    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

    RecordService.Instance.Delete(record, e.Form);


    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);
  • Dennis Aaen 4300 posts 17455 karma points admin hq c-trib
    Aug 15, 2017 @ 17:56
    Dennis Aaen

    Hi JLon,

    I was thinking if you have been hit by this issue - ?

    If so could you please try upgrade your Umbraco Forms by using this set of files and follow this documentation

    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,


Please Sign in or register to post replies

Write your reply to: