Creator Help

Configuring a Function as Custom Action

Overview

Custom Actions are actions performed on selected records in a report 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 report. This action can be invoked for selected records of the report, in live mode. The Custom Actions can be listed in the Report header, displayed as Buttons for Each Record in the Report, or Show Action in Each Row Under Edit Menu. In the Column Properties tab of the Report Settings, you will see both "View Columns" & "Custom Actions" defined for the report. The buttons can be reordered to any place in the report.

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 "sendmail" is defined to send mails to the selected records in a report.
  • 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.


 

2. 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 Report Header

  1. Select the Report from Dashboard.
  2. Click on Report Settings -> Custom Actions.
  3. Specify the Action Name and the Display type.
  4. The show action in Report header display type would check the records for which the custom action must be executed and then request this Custom Action from the Report Header.
  5. The Execution Type option will be displayed only if the custom action is configured in the report header.
  6. In the Execute action for each record, the custom action will be called for each record. This is supported for functions with any argument type.
  7. In the Execute action for collection of records, in which case the custom action will be called for a set of records.
  8. To configure the function as a custom action,
  • Select the Application in which the function is defined.Select the Namespace in which the function is defined. Choose the function to 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 report base form will not be listed. For example, if a report is based on Form A, but the function has a form object argument for Form B, 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_Id field is passed as value to the argument "toaddress".

     9.  Finally, Click on Create to create the Custom Action.

Screen-shot of Custom Action definition in Report Header

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

Screen-shot of Custom Action Listed in the Report Header

Configure the Function as Custom Action - For Each Record

  1. Select the Report from Dashboard.
  2. Click on Report Settings -> Custom Action.
  3. Specify the Action name and the Display type.
  4. The display type is defined as show action for each record, in which case the custom action will be displayed as a clickable button for each record.
  5. Enter the Success Message to be displayed on the execution of Custom Action in the Success message dialog.
  6. The Action Name name specified will be listed as a clickable button for each record in the report.

    7.  To configure the function as a custom action,

  • Select the Application in which the function is defined.Select the Namespace in which the function is defined. Choose the function to 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 report base form will not be listed. For example, if a report is based on Form A, but the function has a form object argument for Form B, this function will not be listed.
  • 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_Id field is passed as value to the argument "toaddress".

     8.  Finally, Click on Create to create the Custom Action.

Screen-shot Of Custom Action Definition For Each Record

The Custom Action defined above, will be displayed as a button for each record in the report, as shown below. Click on the button, to execute the action on a specific record in the report.

Screen-shot of Custom Action Listed as a Button for Each Record


Configure the Function as Custom Action - Each Row Under Edit Menu

  1. Select the Report from Dashboard.
  2. Click on Report Settings -> Custom Action.
  3. Specify the Action Name of your choice and the check the Show action in each row under edit menu display type.
  4. Enter the Success Message to be displayed on the execution of Custom Action in the Success message dialog.
  5. To configure the function as a custom action,
  • Select the Application in which the function is defined.Select the Namespace in which the function is defined. Choose the function to 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 report base form will not be listed. For example, if a report is based on Form A, but the function has a form object argument for Form B, this function will not be listed.
  • 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.

    6. Finally, Click on Create to create the Custom Action as shown in the screen-shot below.

The Custom Action defined above, will be displayed in the edit menu drop-down list  for each record in the report, as shown below. Click on the button, to execute the action on a specific record in the report.

Screen-shot of Custom Action Listed in Each Row Under Edit Menu

Note:

  • Custom Actions are supported only in List & Grid Views.
  • The Deluge openURL task is not supported if the custom action that invokes a function (with the openURL task) is placed in the Report header. Refer openURL task - Limitation for more information.
  • While deleting a function, if there is any custom action present in a report 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.

Related Links

Functions

Top