Bookshelf Home | Contents | Index | PDF |
Siebel Object Interfaces Reference > Interfaces Reference > Business Service Events > Service_PreInvokeMethod EventThe PreInvokeMethod event is called before a specialized method on the business service is invoked. SyntaxService_PreInvokeMethod(methodName, InputArguments, OutputArguments)
Returns"ContinueOperation" or "CancelOperation" UsageIf implementing a new method, or overriding the behavior of a method implemented in a specialized business service, the script should return CancelOperation to avoid invoking an "Unknown method name" error. As Figure 8 illustrates, this error is predictable if the PreInvokeMethod event is scripted. This occurs because there is no native code to execute in the InvokeMethod event. CancelOperation tells the Siebel application to cancel the remaining operations associated with the event. NOTE: The example in Figure 8 applies only to new and user-defined methods. For existing standard Siebel methods, it is not necessary to use CancelOperation. Service_InvokeMethod is rarely scripted, but can be used for such post-operation events as posting a notice to a log when the event completes successfully. Used WithExampleThis Siebel VB example creates the new service "Shipping Engine." Function Service_PreInvokeMethod (MethodName As String, Inputs As PropertySet, Outputs As PropertySet) As Integer If MethodName = "CalculateShipping" Then Dim sShipper As String, sShipMethod As String iReturn = ContinueOperation Select Case sShipper Case "Airline" Case "Ground" sCost = Format(dCost, "Currency") Service_PreInvokeMethod = iReturn See Also |
Siebel Object Interfaces Reference |