Default entity

The default entity for a hook is created by Rational® ClearQuest® before a hook starts, and represents the current record upon which an action is being done.

For Perl, you retrieve this object using:

$entity

If you are referencing another entity in the context of one record's action (such as executing a call to the BuildEntity method to submit a new record), you need to maintain the scope of your entity variables. There are two approaches:

For VBScript, you can use the me declaration. For example:

call DoSomething(me)

If you need to explicitly reference the default entity object in order to pass it as an argument, you can use the me declaration to perform operations. For example:

Msgbox me.GetDisplayName()
Dim xme
Set xme = me
Msgbox xme.LookupStateName