Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Workflow - Disable or Hide Actions
#region Actions - Hide (Pre-Defined Action)
screen
.WithActions(action =>
{
action.Add(removeHold);
action.Add(putOnHold);
action.Add(complete);
action.Add(reopen);
action.Add(g => g.schedule, a => a
.WithCategory(processingCategory)
.IsHiddenWhen(conditions.IsScheduled)
);
});
#endregion
#region Actions - Disable (Workflow Defined Action)
var complete = context.ActionDefinitions
.CreateNew(_actionComplete, a => a
.WithCategory(processingCategory)
.PlaceAfter(putOnHold)
.IsDisabledWhen(!conditions.IsScheduled)
);
#endregion
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment