Skip to content

Instantly share code, notes, and snippets.

@BrianMRO
Last active February 28, 2022 20:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BrianMRO/d4eaf625a80734c6e436a14ce85a04ca to your computer and use it in GitHub Desktop.
Save BrianMRO/d4eaf625a80734c6e436a14ce85a04ca to your computer and use it in GitHub Desktop.
Workflow - Define Actions (2021 R2)
#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