Siebel Object Interfaces Reference > Interfaces Reference > Application Methods >

InvokeMethod Method


InvokeMethod calls a specialized method or user-defined method specified by its argument.

Browser Script Syntax

theApplication().InvokeMethod(methodName, methodArgs);

Argument
Description

methodName

The name of the method.

methodArgs

One or more strings containing arguments to methodName.

Server Script Syntax

Application.InvokeMethod(methodName, methodArgs);

Argument
Description

methodName

The name of the method.

methodArg1, methodArg2, ..., methodArgN

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 Boolean

Usage

InvokeMethod allows you to call methods on an Application object that is exposed directly through the Application interface.

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

Used With

Browser Script, COM Data Control, COM Data Server, Java Data Bean, Mobile Web Client Automation Server, Server Script

Example

For an example, read InvokeMethod Method.

InvokeMethod Methods for the Application Object

The following methods are supported for use with InvokeMethod:

GetDataSource Method

Returns the name of the data source, as defined in the DataSource server parameter, that is being used for the session. (The default is ServerDataSrc.)

Syntax

dataSrc = Application.InvokeMethod("GetDataSource")

Argument
Description

Not applicable

 

Returns

A string containing the value of the data source currently used by the application.

Used With

This method is supported by Application.InvokeMethod() calls in COM Data Control, Java Data Bean, Mobile Web Client Automation Server, and Server Script.

Example

The following eScript example detects the data source and displays its name in a dialog box.

var dataSrc = TheApplication().InvokeMethod("GetDataSource");
TheApplication().RaiseErrorText(dataSrc);

The following is the same example in Siebel VB.

Dim dataSrc As String
dataSrc = TheApplication.InvokeMethod("GetDataSource")
TheApplication.RaiseErrorText(dataSrc)

IsViewReadOnly Method

You can use the IsViewReadOnly method to test whether a view is read-only.

Syntax

Application.InvokeMethod("IsViewReadOnly",viewName)

Argument
Description

viewName

The name of a view, as defined in Siebel Tools, in double quotes or a variable containing the name of a view.

Returns

Returns TRUE if the view is read-only, else it returns FALSE. If neither of these values is returned, then an error has occurred. Your script should provide a handler if neither TRUE nor FALSE is returned.

Usage

You can set a view as read-only for particular responsibilities in the Responsibility Administration view. One use of the IsViewReadOnly method is to determine whether such a view is read-only for the current responsibility before attempting to edit a field.

Buttons are not automatically set to read-only on views that are read-only due to the view-responsibility association, so another application is to set buttons to read-only in views for which IsViewReadOnly returns TRUE.

Used With

This method is supported by Application.InvokeMethod() calls in Browser Script, COM Data Control, COM Data Server, Java Data Bean, Mobile Web Client Automation Server, and Server Script.

Example

The following example for Siebel eScript determines whether the active view is read only:

function ShowViewROStatus()

{

var sActive = TheApplication().ActiveViewName();

if (TheApplication().InvokeMethod("IsViewReadOnly",sActive) == "TRUE")

TheApplication().RaiseErrorText(sActive + "is read only.");

else

TheApplication().RaiseErrorText(sActive + "is not read only.");

}

Language Method

Retrieves the language code of the language in which the active application is running.

Syntax

Application.InvokeMethod("Language");

Argument
Description

Not applicable

 

Returns

The language code of the active application, for example ENU

Used With

This method is supported by Application.InvokeMethod() calls in Server Script.

Example

Siebel VB:

Dim curLang As String

curLang = TheApplication.InvokeMethod("Language")

Siebel eScript:

var curLang;

curLang = TheApplication().InvokeMethod("Language");

LookupValue Method

Finds a row in S_LST_OF_VAL where the TYPE column matches the type argument, the CODE column matches the lang_ind_code argument, and the LANG_ID column matches the language code of the currently active language. This function is used to obtain the translation of the specified untranslated value in the specified LOV into the currently active language.

Syntax

val = Application.InvokeMethod("LookupValue", type, lang_ind_cd)

Argument
Description

type

Type as specified in the List of Values administration view.

lang_ind_cd

Language independent code value as specified in the List of Values administration view.

Returns

Returns a string containing the display value (the VAL column) for the row. LookupValue tries to find the display value for a given language independent code. If the display value is not found, LookupValue returns the language independent code itself as the value.

Used With

This method is supported by Application.InvokeMethod() calls in COM Data Control, Java Data Bean, Mobile Web Client Automation Server, and Server Script.

Example

The following eScript example finds a row in S_LST_OF_VAL where the TYPE column matches the type argument, the CODE column matches the lang_ind_code argument, and the LANG_ID column matches the language code of the currently active language. This function is used to obtain the translation of the specified untranslated value in the specified LOV into the currently active language.

var LOVText = TheApplication().InvokeMethod("LookupValue","SR_AREA","Network");

Siebel Object Interfaces Reference Copyright © 2008, Oracle. All rights reserved.