Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 6 Next »

You can create a custom action to enable execution on desktop objects. Also, you can create general web actions that do not require desktop objects.  

.

1. Create a Custom Action in VB Script

Create the custom action in VBScript by taking into consideration the custom action rules.

For example, if you want to create custom action as "CustomSetValueInEditBox" for WebEdit, create a new vbs file with name CustomWebEdit. This action will set the specified value into the webedit so method will look similar to below.

The first arg is the webedit object as this action will directly perform the action on the edit boxobject. The second arg is of type string which is the value that needs to be set in the edit box. The custom action returns with an integer value.

(info) If the action does not interact with any object then ObjectInfo parameter is not required.

To create a custom action for desktop projects:

  1. Open the desktop project where you want to create a custom action.
  2. Click Develop > Custom Actions.
  3. Click Create Custom Action.
  4. Do the following in the order listed.
    1. Enter the name of action, in Action Name.
    2. Enter the role of the custom action, in  Description.
    3. From the Technology drop-down list, select the technology under which you want to create a  custom action.
    4. From the Base Class drop-down list, select a base class.
      Note: If you select a base class as WebGeneral to create general web actions, you get a pop-up where you can select to code in Jave or VB. Upon selecting Java, it opens the dialog box for creating web general action. For more information, refer to creating a custom action for web and mobile.
    5. From the VBS File drop-down list, select an existing visual basic file or select Create New File to create a new visual basic file.
      If you select Create New File, enter the name of the new VB file you want to create.
    6. From the Functions drop-down list, select an existing function or select Create New Function to create a new function.
      If you select Create New Function, enter the name of new function you want to create.
  5. Add the required parameters in the Properties section.

    (warning) Do not set the object parameter as given in the custom class. The user only needs to add the parameters in the same sequence as given in the vbs file excluding the Object Parameter. Then select the argument data type as String, Integer, or Array. Also, check if the parameter is Mandatory. Deselecting Mandatory option indicates that the parameter is not mandatory, that is zero length string data is allowed.

  6.  Click OK.
    The custom action is added.
  7. Click Edit Code to do the coding required to build the custom action.
    .


  • No labels