Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I've just gone through the documentation on Umbraco Forms (even creating a pull request to fix typos and update a couple of bits) but I'm not sure what I've come up with on creating a Workflow is correct.
The documentation is here:
The code there looks to be either a bit out of date or I'm missing some using directives (or both) as it doesn't seem to work. I suspect it's out of date as it uses Log.Add rather than Umbraco.Core.Logging.LogHelper. Also the RecordService doesn't seem to accept a parameter now (I've modified this by passing the record and form in the delete method.. though there doesn't seem to be a Dispose method).
Basically is what I've come up with correct or bat-muck crazy? After all this messing around my solution builds but when I try to add the workflow an exception is thrown about WorkflowController.cs not found?
Has anyone got any tips on this please?
public class TestFormWorkflow : Umbraco.Forms.Core.WorkflowType
public override WorkflowExecutionStatus Execute(Record record, RecordEventArgs e)
// first we log it
Umbraco.Core.Logging.LogHelper.Info(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType, "the IP " + record.IP + " has submitted a record");
// we can then iterate through the fields
foreach (RecordField rf in record.RecordFields.Values)
// and we can then do something with the collection of values on each field
List<object> vals = rf.Values;
// or just get it as a string
// If we altered a field, we can save it using the record storage
RecordStorage store = new RecordStorage();
// we then invoke the recordservice which handles all record states //and make the service delete the record.
RecordService rs = new RecordService();
public override List<Exception> ValidateSettings()
throw new NotImplementedException();
I am also facing same issue. Were you able to resolve this.
I found this on Stackoverflow which works.
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted