You can add a record script to a record type from the Record Scripts
folder in the ClearQuest Schema Repository Designer or with the Record Actions
grid.
About this task
To add a record script
with the Actions grid, see
Adding actions. To
add a record script through the Record Scripts folder:
- Start the Designer.
- In the ClearQuest Schema Repository Explorer view, expand the Record
Types node and then expand the desired record type.
- Expand the Record Scripts folder.
- Right-click the language folder and click Add. The Designer adds a script to the folder; the name is highlighted
so that you can change it.
- Type a name for the record script.
- Double-click the new record script name to star the Script editor.
- Edit the record script. Type your code in place of this line:
REM added your hook code here
- When you are finished editing your code, click to catch any syntactical errors.
When you compile your script, your code is saved.
- Close the Script Editor window.
Results
For each record script you define, the Script editor creates a stub
that includes the record name, hook name, and required syntax. The following
is an example of the Visual Basic hook format:
Function RecordName_HookName(param)
' param as EventObject
REM Your code here
End Function
The parameter passed to a record script is an instance of the
EventObject class. This instance contains information about the event that
triggered the call to the hook. It contains the type of the event, the control
that invoked it, and additional information depending on the type of event.
For more information, see Record scripts.