Understanding record scripts

Record scripts are a generic form of hook that are called in response to an event on a Rational® ClearQuest® form or from other hooks. Typically, record scripts are used to implement an action that you want to perform in response to a click event on a push button or on a context menu item associated with a particular field on a Rational ClearQuest form. Record scripts are scripts that can be executed within the context of one record type.

If you associate a record script to a push button, when a user pushes the button, the script is executed.

All record scripts have the following syntax:

A record script:

When associated with a form control, the parameter passed into the method contains an instance of the EventObject class. This instance contains information about the event that caused the hook to be called. (See Form Control Events for information on these events.)

When calling a record script from another hook, the parameter you pass into the method is a Variant containing whatever data is appropriate. If the record script returns data to the calling hook, that information is returned as a Variant as well.

You can associate one or more record scripts to a form control.