Last active
March 3, 2022 15:22
-
-
Save BrianMRO/82b7c5075ef046207406857bd13116e4 to your computer and use it in GitHub Desktop.
Workflow - Disable or Hide Actions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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