Use a Self-Reference to Indicate the Current Object
To indicate the current object, you can use the following statements:
In Siebel VB, use the Me statement.
In Siebel eScript, use the This keyword.
You can use the statement or keyword instead of referencing an active business object.
Example of Using the Me Statement
The following business component event handler uses the Me statement instead of the ActiveBusComp statement:
Function BusComp_PreSetFieldValue(FieldName As String, FieldValue As String) As
Integer
If Val(Me.GetFieldValue("Rep %")) >75 Then
TheApplication.RaiseErrorText("You cannot set the Rep% to greater than 75")
End If
BusComp_PreSetFieldValue = ContinueOperation
End Function
For examples of using the Me statement, see the following topics:
Example of Using the This Keyword
The following business component event handler uses the This keyword instead of the ActiveBusComp statement:
if (condition)
{ ...
this.SetSearchSpec(...);
this.ExecuteQuery();
return (CancelOperation);
}
else
return(ContinueOperation);