Button Fields

Inbuilt Button Fields

Field Name Title Definition
DELETE_BUTTON Delete Button The item delete button. Access to the security permissions for this button allow users to delete issues
EDIT_BUTTON Edit Button The drill down edit button used on reports and within email
HISTORY_BUTTON History Button The button that accesses history from the edit screen or reports
QUICKEDIT_BUTTON Quickedit Button The button that accesses the Quickedit mode from column reports and Quicklists
VIEW_BUTTON View Button The drill down button that allows you to see the detailed report for an issue

User Defined Button Fields

This allows you to create and place a button with any label of your choosing on an add or edit screen.

Define a field with a display type of Custom in the data dictionary, with its name begining with the characters BUTTON_ or ending with the characters _BTN. Placing this field on an add or edit screen layout results in a button being generated on the screen, when you place the field on a layout.

The following are used to define the button:

Data dictionary field Purpose
Name This defines the name of the field. For example, a button named BUTTON_GENERATE is valid.
Display Type Must be Custom
Title Typically this is a space character
Help Text This will become the text on the button

To provide the action for the button, place a layout cell attribute of type FIELD HTML MODIFIER within the layout upon which you place the button. There are three primary ways you can provide an action for this button:

  • If you want to open a new window where you can add a different issue, your FIELD HTML MODIFIER may look like this:

    onclick=window.open("evSignon?p_action=doAddDisplay&p_option=Display&p_close_win=true&ev_menu=off&p_area=7&p_project=9")

    The parameters for the Area and Project use their respective IDs. Note that the URL does not need to reside within ExtraView and your action might open up a web address anywhere. See the API Guide for more information.

  • Your button might look to execute business rules. As an example, you might want to add a new issue directly into the database, using values from the current issue. To accommodate this functionality, there is an inbuilt JavaScript function that will execute your rules when the button is created. To configure this, follow these steps:
    • The FIELD HTML MODIFIER that acts upon the pressing of the button should be:

      onclick='javascript:;submitChange(this.name)';

    • Create your business rules. This example shows how you might add an issue into a different business area, while copying over some of the field values from the current issue. It is based upon your button field name being BUTTON_CREATE_TEST_CASE:

      if (BUTTON_CREATE_TEST_CASE.{changed}) {
        ADD :
          AREA = 'Test Case Management';
          PROJECT = 'Test Cases';
          TEST_CASE_STATUS = 'New';
          PROCEDURE = TEST_INSTRUCTIONS;
          MODULE_ID = MODULE_ID;
          ASSIGNED_TO = '{null}';
          CREATED_FROM_BUG_ID = ID;
          COMMENTS = DESCRIPTION;
      }

  • You can provide an action for the button by implementing custom code within the method named ucRenderEmbeddedObject. The standard distribution of ExtraView that ships with the user custom class named CustomCodeBase.java contains this functionality. In this case, you would write a user custom JavaScript function that submits a URL to the server to execute the server-side code within CustomCodeBase.java.