Custom Action

Custom action enables the user to run a customized Stored Procedure directly from the user interface.

Step 1

Add the custom action procedure to the table custom_actions, a header table that stores the values displayed the UI.

custom_actions

  • id (int) - required:
  • name (nvarchar):The name that is to displayed in the UI
  • description (nvarchar): The description appears in the UI when the custom action is chosen
  • stored_procedure (nvarchar): Name of the stored procedure that is triggered by the Custom Action. Do not include dbo. in the name
  • requried_role (nvarchar): Null = Everyone, 1 = Admin role, 2 = User-role
  • created_at (datetime) - required
  • updated_at (datetime) - required

Step 2

If there are any parameters then add them to the table Custom_action_parameters.

custom_action_parameters

  • id (int) - required
  • custom_action_id (int): Refers to the id column in the custom_action table
  • order_num (int): Refers to the order of the parameters in the UI. If only one parameter then order_num=1. If two parameters then order_num=1 for the first parameter, 2 for the second parameter
  • name (nvarchar): The name of the parameter
  • description (nvarchar): The description of the parameter
  • Proc_param_name (nvarchar): Name of the parameter in the database. Needs to include @
  • required (bit)
  • created_at (datetime) - required
  • updated_at (datetime) - required



Example:

example_custom_action