Siebel Object Interfaces Reference > Interfaces Reference > Applet Methods >

InvokeMethod


The InvokeMethod method invokes the specialized or custom method specified by its argument.

Browser Script Syntax

oApplet.InvokeMethod(methodName, methodArgs_PropSet);

Argument
Description
methodName
The name of the method
methodArgs
Property set containing the method arguments

Server Script Syntax

Applet.InvokeMethod(methodName, methodArgs);

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

Available to Browser and Server scripting. If the method to be invoked exists in the Browser, it executes in the browser. Otherwise, the request is sent to the server for execution.

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

Browser Script, Server Script

Example

Here is a Siebel VB example:

Function WebApplet_PreInvokeMethod (MethodName As String) As Integer
' Invoke a Siebel SmartScript from a custom button
' using the applet.InvokeMethod method
   If (MethodName = "InvokeSScriptFromButton") Then
      Dim sArgs(3) As String
      sArgs(0) = "Demo Opportunity Profile"
      sArgs(1) = ""
      sArgs(2) = ""
      Me.InvokeMethod "RunCallScript", args
      WebApplet_PreInvokeMethod = CancelOperation
   Else
      WebApplet_PreInvokeMethod = ContinueOperation
   End If
End Function


 Siebel Object Interfaces Reference 
 Published: 18 June 2003