New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not able to save recordfields in a custom workflow #431
Comments
I'm also having the same issue. I have a workflow that runs on submit that changes the value of a hidden field. This worked fine on forms version 8.3 but now none of my changes are saved after upgrading to 8.5.3. My code:
|
Thanks, I can confirm this worked in Forms 8.3.2 and stopped working in v8.4. We'll need to have a look. The full code I used: using System;
using System.Collections.Generic;
using System.Linq;
using Umbraco.Forms.Core;
using Umbraco.Forms.Core.Enums;
using Umbraco.Forms.Core.Persistence.Dtos;
namespace MyNamespace
{
public class CustomWorkflow : WorkflowType
{
public override WorkflowExecutionStatus Execute(Record record, RecordEventArgs e)
{
foreach (var rf in record.RecordFields.Values.Where(rf => rf.Alias.ToLower() == "ordernumber"))
{
// set the value to the current order number
rf.Values.Clear();
rf.Values = new List<object> { "overruled" };
}
return WorkflowExecutionStatus.Completed;
}
public override List<Exception> ValidateSettings()
{
return new List<Exception>();
}
}
} I have a field of type short answer with the alias of |
Thanks for the example @nul800sebastiaan |
As I am running out of time before I hit holiday for a few days, but debugging and stepping through the problem seems to lies in the changes in the workflow service. Linking this here for reference when I come back next week
|
Hi @warrenbuckley, any update on this? I am having the same issue running Umbraco Forms v8.5.5, and tried v8.60 now as well. Mine is slightly different - I am using code similar to #186 (comment) , biggest difference being I am calling Last known version where I know this worked was in Umbraco Forms v8.3.2 Environment details:
If you need any more information, let me know. |
This has been fixed and will be in the next version 8.6.1 |
I created a customwork workflow that is adding values to specific fields. The code hits all the code but not saved in the database.
Umbraco: 8.8
Forms: 8.5.3
Bug summary
Impossible to save data in recordfield
This item has been added to our backlog AB#9369
The text was updated successfully, but these errors were encountered: