Custom Actions
Table of Contents
Overview
Custom Actions are actions performed on selected records in a view by executing function calls. For example, you can define a function to send email notifications and configure this function as a custom action for a view. This action can be invoked for selected records of the view, in access mode. The custom actions can be listed in the View header or displayed as buttons for each record in the view. In the Preview section of the view, you will see both "View Columns" & "Custom Actions" defined fro the view. The buttons can be reordered to any place in the view.
Add new function
- Create the function by specifying the function name, namespace, return type and arguments to be passed to this function. Click Done to add the function to the Functions tree.
- The function named "EmailNotification" is defined to send mails to the selected records in a view.
- This function does not return any value, and hence the return type is "void".
- The "To address" must be passed as an argument to this function. Hence, the argument named "toaddress" of type string is added.
- Add the send mail Deluge statement to this function, by specifying the "To address" as the "toaddress" string argument defined in the function.
Configure the function as custom action - in View Header
- Select the view from the Views tab
- Click on Actions -> Custom Actions and specify the following values:
- Action Name:The name specified will be listed in the view header.
- Display Type: The Custom Actioncan be defined as
- show action in view header, in which case user would check the records for which the custom action must be executed and then request this Custom Action from the View Header
- show action for each record, in which case the custom action will be displayed as a clickable button for each record. Click on the button to execute the action for that specific record.
- Execution Type: This option will be displayed only if the custom action is configured in the view header.
- Execute action for collection of records, in which case the custom action will be called only once for executing a collection of records. This is supported only for functions with formobjects as arguments.
- Execute action for each record, in which case the custom action will be called for each record. This is supported for functions with any argument type.
- Function Configuration:
- Select the Application in which the function is defined.
- Select the Namespace in which the function is defined.
- Select the functionto be executed. The functions will be listed based on the arguments configured to the function.
- By default, all the functions with normal object (argument) and form object (argument) will be listed. But, the form object (argument) which is not related to the current views base form will not be listed. For example, if a View is based on FormA, but the function has a form object argument for FormB, this function will not be listed.
- If the Execution type is selected as Execute action for collection of records, only the functions with formobjects as arguments will be displayed.
- Specify the arguments to the function. The arguments configured for the selected function will be listed. Select the field whose value must be passed to the arguments. For instance, in the screen-shot given below, the value of the Email_1 field is passed as value to the argument "toaddress".
- Click Done to update the changes.
Screen-shot of custom action definition in view header

- The custom action defined above, will be displayed in the view header, only when one or more records are selected in the view. For example, to send mail to selected records in a view, select the records and select the custom action "Send mail", as shown in the screen-shot given below. The email will be sent to selected records in the view.
Screen-shot of custom action listed in the view header

Configure the function as custom action - for each record
- Select the view from the Views tab
- Click on Actions -> Custom Actions and specify the following values:
- Specify Column Header:This option will be displayed only if the Display Type is selected as "show action for each record". Specify the column header name under which the custom action button will be displayed.
- Action Name:The name specified will be listed as a clickable button for each record in the view.
- Display Type: The Custom Actioncan be defined as
- show action in view header, in which case user would check the records for which the custom action must be executed and then request this Custom Action from the View Header
- show action for each record, in which case the custom action will be displayed as a clickable button for each record. Click on the button to execute the action for that specific record.
- Function Configuration:
- Select the Application in which the function is defined.
- Select the Namespace in which the function is defined.
- Select the functionto be executed. The functions will be listed based on the arguments configured to the function.
- By default, all the functions with normal object (argument) and form object (argument) will be listed. But, the form object (argument) which is not related to the current views base form will not be listed. For example, if a View is based on FormA, but the function has a form object argument for FormB, this function will not be listed.
- If the Execution type is selected as Execute action for collection of records, only the functions with formobjects as arguments will be displayed.
- Specify the arguments to the function. The arguments configured for the selected function will be listed. Select the field whose value must be passed to the arguments. For instance, in the screen-shot given below, the value of the Email_1 field is passed as value to the argument "toaddress".
- Click Done to update the changes
Screen-shot of custom action definition for each record

- The custom action will be displayed as a column n the Preview section of the view. The buttons can be reordered to any place in the view.

- The custom action defined above, will be displayed as a button for each record in the view, as shown below. Click on the button, to execute the action on a specific record in the view.
Screen-shot of custom action listed as a button for each record

Note:
- Custom Actions are supported only in List Views.
- The Deluge openURL task is not supported if the custom action that invokes a function (with the openURL task) is placed in the view header. Refer openURL task - Limitation for more information.
- While deleting a function, if there is any custom action present in a view which is calling the function, the user will be prompted to delete the custom action as well. If the user accepts, the custom action will also be deleted along with the function.
