Overview
string WorkItemmyWorkItem.SelectedAction { get; set; }
Remarks
If no action selected, this property returns null.
If WorkItem.State is not in Waiting or Created trying to set this property prohibited and throws an access denied error.
While setting this property if specified action not found throws an scripting error.
Example
Reading User Action
Code Block | ||
---|---|---|
| ||
if ( $WorkItem.SelectedAction == 'Approve' ) {
...
} |
Example
Setting an Action
Code Block | ||
---|---|---|
| ||
$WorkItem.SelectedAction = 'Approve'; |