Last active
February 28, 2022 20:21
-
-
Save BrianMRO/d4eaf625a80734c6e436a14ce85a04ca to your computer and use it in GitHub Desktop.
Workflow - Define Actions (2021 R2)
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 Categories | |
var processingCategory = CommonActionCategories.Get(context).Processing; | |
#endregion | |
#region Define Constants | |
private const string | |
_actionRemoveHold = "Remove Hold", | |
_actionPutOnHold = "Hold"; | |
#endregion | |
#region Actions | |
var removeHold = context.ActionDefinitions | |
.CreateNew(_actionRemoveHold, a => a | |
.WithCategory(processingCategory) | |
.PlaceAfter(g => g.Last) | |
); | |
var putOnHold = context.ActionDefinitions | |
.CreateNew(_actionPutOnHold, a => a | |
.WithCategory(processingCategory) | |
.PlaceAfter(removeHold) | |
); | |
#endregion |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment