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
SAVE_BUTTON Save Button This button is used on attachment layouts, allowing users to save rather than view attachments

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 beginning 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.  Note that when you create a button field in this manner, a global attribute named CONFIRM_STANDARDS is added to it's data dictionary entry.  This does not need to be altered in any way by the administrator.

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. When pressing your button executes an onchange business rule, ExtraView will execute the necessary onclick action to initiate the action. 

    In versions of ExtraView prior to 10.0, you may have added a JavaScript function via the HTML_MODIFIER attribute, such as:  

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

    This is no longer required for the functionality to work. If you have such a HTML_MODIFIER, it will adversely effect the smooth functioning of the ExtraView code by introducing unnecessary screen refreshes.  Therefore, remove the HTML_MODIFIER if it exists from a previous version

  • 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';
        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.