User-Defined Buttons

Modified on Tue, 20 Jan at 11:12 AM

TABLE OF CONTENTS



User-Defined Buttons

User-defined buttons allow you to add custom actions to the main grid views of the Applications, Users, Devices, Deployment Units, and Bespoke modules. These buttons can run PowerShell scripts, initiate ESM Plans, send emails, or execute built-in actions via the ManagementStudio API. User-defined buttons are accessed from the right-click context menu on the grid. Sub-buttons can be added to organise complex actions and improve usability.

Note: The primary (top-level) button on the context menu is a container and cannot execute actions. At least one sub-button must be configured to perform an action.



Example - Custom Buttons added to Grid Context Menu


Button Types

User-defined buttons support several action types. Each button can only perform one type of action.

  • Script Buttons: Pass selected grid items (such as Applications or Users) to a PowerShell script.
  • ESM Plan Buttons: Pass selected items to an ESM Plan for processing.
  • Send Email Buttons: Send emails to selected items using designated templates.
  • Action Buttons: Invoke built-in actions on selected items.

Limitation: A single button cannot perform multiple action types (e.g., execute a PowerShell script and run an ESM Plan); one action type per button is enforced.




Script Buttons

Script buttons execute pre-registered PowerShell scripts configured in the Administration → PowerShell Scripts area. You can prompt users for input before running the script. Input is passed as variables to the script for flexible automation.



User Input Options

When creating a script button, you can request input from the user with several configurable input types:

Input TypeDescriptionControl Args
Text - Single LineUser enters a single line of textNone
Multi-LineUser enters a block of textMaxLines:5;
Date and TimeUser selects date and timeMaxDate:YYYY-MM-DD; MinDate:[Today-1];
Date OnlyUser selects a dateMaxDate:YYYY-MM-DD; MinDate:[Today-1];
Time OnlyUser selects a timeMinHour:HH; MaxHour:HH; Interval:HalfHour;
CheckboxUser selects TRUE/FALSE (default: FALSE)None
IntegerUser enters a whole numberMaxValue:50; MinValue:0;
DecimalUser enters a decimal numberMaxValue:50; MinValue:0;
DropdownUser selects a single item from a listItems:Option1|Option2|Option3
ListboxUser can select multiple items from a listItems:Option1|Option2|Option3
Module ItemsUser selects items from any supported moduleModule:ModuleName; Multiple;
Valid Module values: Applications, UserMigrations, Devices, Mailboxes, BespokeModule, DeploymentUnits, Dashboard, Defects, Tasks
Adding Multiple allows multi-selection.

Example user input configuration:

Dropdown: Items:AD Group1|AD Group 2|AD Group3
Date Only: MaxDate:2024-01-01;MinDate:[Today-1]
Integer: MaxValue:50;MinValue:0;



ESM Plan Buttons

ESM Plan buttons initiate automated processing on selected grid items by running a configured ESM Plan. To assign an ESM Plan to a button, select the desired plan from the Run ESM Plan column in the Button UI Grid.

Key Points:

  • Only ESM Plans targeting the current module (e.g., Applications) will appear in the dropdown.
  • Each button can be linked to a single ESM Plan.



UI Buttons Grid Columns

User-defined buttons are managed in a setup grid with sections for Button configuration, Options, and Actions. The following table describes each field:

ColumnDescription
Button LabelThe displayed label in the context menu. Sub-buttons are shown as nested entries.
Sub-ButtonAdd a sub-button by clicking the plus icon next to the label. Supports multiple nesting levels for creating menu hierarchies.
Is EnabledControls whether the button is presented in the context menu. If unticked, the button is hidden.
IconFont Awesome Pro icon name for display (e.g., bullseye-pointer).
Grant Access 1/2/3Assigns role groups allowed to use the button. Buttons appear only for users in these role groups. Different buttons can have different access rules.
OrderDetermines the sequence of buttons and sub-buttons in the menu.
Context MenuWhen enabled, the button is accessible from the right-click context menu.
Are You SureIf enabled, prompts the user for confirmation before running the action (script, ESM Plan, or email).
UI Wait Complete(Hidden) Puts the grid view into a busy state until the script completes. Use for short scripts to trigger a UI refresh upon completion. Long-running scripts should not enable this to avoid UI lockup; users receive a notification when the script finishes.
Limit(Hidden) Maximum number of grid items the button can process at once. 0 indicates no limit. Useful for restricting long-running or high-risk scripts.
Script User InputAdds a user input prompt (Textbox, Number Picker, Date Picker). Input is passed to the script as the UserInput variable.
User Input LabelLabel for the above input control.
User Input Control ArgsModifiers for setting limits and options on the user input control. See input type details above.
Running Msg to User(Hidden) Text displayed in the alert bar when the button is triggered.
Run ESM PlanAssigns the ESM Plan to execute when the button is used.
Run ScriptSelects which PowerShell script to run (script must be registered under Administration → PowerShell Scripts for the relevant module).
Send EmailSelects the email template to use (template must be defined under Administration → [module] → Email Templates).
Args 1/2/3(Hidden) Custom arguments passed to the script; useful for reusing scripts across multiple buttons with different behaviours.
DeleteMarks the button for deletion upon next save.
IdInternal identifier for the button.
Parent Id(Hidden) References the parent button if this is a sub-button; used for maintaining menu hierarchy and scripting logic.

Note: Hidden columns can be accessed using the column chooser button at the top right of the grid.



Further Support

For additional assistance, visit the ManagementStudio Service Desk to search the knowledge base or submit a support ticket.

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article