Copied to clipboard

Flag this post as spam?

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


  • Ben McKean 272 posts 549 karma points
    May 16, 2017 @ 14:24
    Ben McKean
    0

    Umbraco Forms - UpdateRecord method errors in v 6.01

    Hi,

    I've recently upgraded the version of Umbraco Forms for a site and since I've done that I'm getting an error when I call the UpdateRecord in a custom workflow.

    My code is (which worked previously)

            try
            {
                using (var rs = new RecordStorage())
                {
                    rs.UpdateRecord(record, e.Form);
                }
            }
            catch (Exception exception)
            {
                Umbraco.Core.Logging.LogHelper.Error<Testworkflow>("Error updating Umbraco Forms record", exception);
            }
    

    The error I get is:

    The DELETE statement conflicted with the REFERENCE constraint "FKUFRecordDataStringUFRecordFields_Key". The conflict occurred in database "g[DB NAME]", table "dbo.UFRecordDataString", column 'Key'. The statement has been terminated.

    Any help appreciated.

    Thanks

    Ben

  • Ben McKean 272 posts 549 karma points
    May 16, 2017 @ 14:47
    Ben McKean
    0

    Having looked into this, its not due to the latest version of Umbraco Forms. I've rolled back versions and still getting the error.

  • Ben McKean 272 posts 549 karma points
    May 16, 2017 @ 16:05
    Ben McKean
    0

    OK...further update. If I tick the "Enable moderation" tick box it works! However I would expect that if it wasn't ticked then I'd get a meaningful error rather than it showing me a SQL exception.

    enter image description here

Please Sign in or register to post replies

Write your reply to:

Draft