Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Umbraco Contour - Manually approve a record
// Record Storage
Umbraco.Forms.Data.Storage.RecordStorage rs = new Umbraco.Forms.Data.Storage.RecordStorage();
Guid formGuidGuid = new Guid("<your form GUID here>");
// Get the record
Umbraco.Forms.Core.Record record = rs.GetRecord(formGuidGuid);
// RecordService
Umbraco.Forms.Core.Services.RecordService s = new Umbraco.Forms.Core.Services.RecordService(record);
// Approve
if (s != null)
{
if (s.Record.State != Umbraco.Forms.Core.Enums.FormState.Approved)
{
s.Approve();
}
}
s.Dispose();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.