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.
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.
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)
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
Having looked into this, its not due to the latest version of Umbraco Forms. I've rolled back versions and still getting the error.
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.
is working on a reply...