Siebel Object Interfaces Reference > Interfaces Reference > Applet Methods >

InvokeMethod Method


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 only be used with documented methods. Siebel Systems does not support calling methods with InvokeMethod, unless they are listed in this book. Calling InvokeMethod with an undocumented method is not supported. Undocumented methods may be modified or obsoleted without notice. Use of undocumented methods is entirely at your own risk.

Used With

Browser Script, Server Script

Example

The following example is in Siebel eScript:

function WebApplet_PreInvokeMethod (MethodName)
{
   //Invoke a Siebel SmartScript from a custom button
   //using the applet.InvokeMethod method
   //Note the InvokeSScriptFromButton is from a custom
   //method added to a button
   if (MethodName == "InvokeSScriptFromButton")
   {
      var iReturn = ContinueOperation;
      var sArgs = new Array(3);
      sArgs[0] = "Demo Opportunity Profile";
      sArgs[1] = "";
      sArgs[2] = "";
      this.InvokeMethod("RunCallScript", sArgs);
      iReturn = CancelOperation;
   }
   else
   {
      iReturn = ContinueOperation;
   }
   return(iReturn);
}

Siebel Object Interfaces Reference