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 need to change state from approved to submitted, is that possible?
It would also be very helpfull to manage this from the UI.
//Kalle
Comment author was deleted
This is the source for the approve record record action
using System; using System.Collections.Generic; using System.Linq; using System.Text; using Umbraco.Forms.Core.Services; namespace Umbraco.Forms.Core.Providers.RecordActions { public class ApproveRecord : RecordActionType { public ApproveRecord() { this.Description = "Approves a record"; this.Icon = "approve.png"; this.Id = new Guid("cb126b72-9011-11df-a4ee-0800200c9a66"); this.Name = "Approve"; } public override Enums.RecordActionStatus Execute(Record record, Form form) { RecordService s = new RecordService(record); if (s != null) s.Approve(); s.Dispose(); return Enums.RecordActionStatus.Completed; } } }
And to change the state back to submitted rs.Record.State = FormState.Submitted
Would it be possible to use your own states, like for example "Rejected", "Delivered" etc.?
If you want to execute workflows on states you can't use custom ones only the default ones
But if it's just to store a custom state you can add a hidden field and then set the value of that to your custom state...
Ok, so if I use a hidden field called "active" and want to change the value from "1" to "0". Could I then use the same code for that?
Hello again Tim.
Would it be possible to call an record action from front end?
Well record actions are for extending the records viewer if you don't want to extend that and just execute some code you don't need the record action...
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Is it possible to change state from approved to submitted?
I need to change state from approved to submitted, is that possible?
It would also be very helpfull to manage this from the UI.
//Kalle
Comment author was deleted
This is the source for the approve record record action
Would it be possible to use your own states, like for example "Rejected", "Delivered" etc.?
Comment author was deleted
If you want to execute workflows on states you can't use custom ones only the default ones
Comment author was deleted
But if it's just to store a custom state you can add a hidden field and then set the value of that to your custom state...
Ok, so if I use a hidden field called "active" and want to change the value from "1" to "0". Could I then use the same code for that?
Hello again Tim.
Would it be possible to call an record action from front end?
//Kalle
Comment author was deleted
Well record actions are for extending the records viewer if you don't want to extend that and just execute some code you don't need the record action...
is working on a reply...