Siebel Object Interfaces Reference > Interfaces Reference > Business Component Methods >

InvokeMethod


InvokeMethod calls the specialized method or user-created method named in the argument.

VB Syntax

BusComp.InvokeMethod methodName, methodArgs

Argument
Description
methodName
The name of the method. For more information on the available methods, read InvokeMethod Methods.
methodArgs
A single string or a string array (COM only) containing arguments to methodName

eScript Syntax

BusComp.InvokeMethod(methodName, methArg1, methArg2, ..., methArgn);

Argument
Description
methodName
The name of the method
methArg1, methArg2, ..., methArgn
One or more strings containing arguments to methodName

Returns

In Server Script, returns a string containing the result of the method.

In Browser Script, returns a property set.

Usage

Use InvokeMethod to call methods on a business component object that are not exposed directly through the object interface.

Specialized methods are typically methods implemented in applet or business component classes other than CSSFrame and CSSBusComp, respectively, that is, specialized classes.

NOTE:  The InvokeMethod method should be used only with documented specialized methods. Siebel Systems does not support calling specialized methods with InvokeMethod, unless they are listed in this book.

Used With

Server Script, Mobile/Dedicated Web Client Automation Server, COM Data Control, Java Data Bean, CORBA Object Manager

Example

Here is a Siebel VB example.

(general) (declarations)
Option Explicit

Sub Button1_Click
   InvokeMethod "Select All"
End Sub

Function BusComp_PreInvokeMethod (MethodName As String) As Integer
   BusComp_PreInvokeMethod = ContinueOperation
   On Error GoTo Leave
   If MethodName = "Select All" Then
      Dim oCurBC as BusComp
      Set oCurBC = Me.BusComp
      If oCurBC is not nothing Then
         oCurBC.ClearToQuery
         oCurBC.ExecuteQuery
         BusComp_PreInvokeMethod = CancelOperation
      End If
   End If
Leave:
End Function

Here is the equivalent example in Siebel eScript.

function BusComp_PreInvokeMethod (MethodName)
{
   var iReturn = ContinueOperation;
   If (Clib.errno() != 0)
      break Leave;
   if (MethodName = "Select All")
   {
      var oCurBC = Me.BusComp
      if (oCurBC != null)
         oCurBC.ClearToQuery();
         oCurBC.ExecuteQuery();
         iReturn = CancelOperation;
      }
   }
   return (iReturn);
Leave:
}


 Siebel Object Interfaces Reference 
 Published: 18 June 2003