Bookshelf Home | Contents | Index | PDF |
Siebel Object Interfaces Reference > Interfaces Reference > Application Methods > InvokeMethod MethodInvokeMethod calls a specialized method or user-defined method specified by its argument. Browser Script SyntaxtheApplication().InvokeMethod(methodName, methodArgs); Server Script SyntaxApplication.InvokeMethod(methodName, methodArgs); ReturnsIn Server Script, returns a string containing the result of the method In Browser Script, returns a Boolean UsageInvokeMethod 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 WithBrowser Script, COM Data Control, COM Data Server, Java Data Bean, Mobile Web Client Automation Server, Server Script ExampleFor an example, read InvokeMethod Method. InvokeMethod Methods for the Application ObjectThe following methods are supported for use with InvokeMethod: GetDataSource MethodReturns the name of the data source, as defined in the DataSource server parameter, that is being used for the session. (The default is ServerDataSrc.) SyntaxdataSrc = Application.InvokeMethod("GetDataSource") ReturnsA string containing the value of the data source currently used by the application. Used WithThis method is supported by Application.InvokeMethod() calls in COM Data Control, Java Data Bean, Mobile Web Client Automation Server, and Server Script. ExampleThe following eScript example detects the data source and displays its name in a dialog box. var dataSrc = TheApplication().InvokeMethod("GetDataSource"); The following is the same example in Siebel VB. Dim dataSrc As String IsViewReadOnly MethodYou can use the IsViewReadOnly method to test whether a view is read-only. SyntaxApplication.InvokeMethod("IsViewReadOnly",viewName)
ReturnsReturns 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. UsageYou 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 WithThis 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. ExampleThe following example for Siebel eScript determines whether the active view is read only: var sActive = TheApplication().ActiveViewName(); if (TheApplication().InvokeMethod("IsViewReadOnly",sActive) == "TRUE") TheApplication().RaiseErrorText(sActive + "is read only."); TheApplication().RaiseErrorText(sActive + "is not read only."); Language MethodRetrieves the language code of the language in which the active application is running. SyntaxApplication.InvokeMethod("Language"); ReturnsThe language code of the active application, for example ENU Used WithThis method is supported by Application.InvokeMethod() calls in Server Script. ExamplecurLang = TheApplication.InvokeMethod("Language") curLang = TheApplication().InvokeMethod("Language"); LookupValue MethodFinds 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. Syntaxval = Application.InvokeMethod("LookupValue", type, lang_ind_cd)
ReturnsReturns 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 WithThis method is supported by Application.InvokeMethod() calls in COM Data Control, Java Data Bean, Mobile Web Client Automation Server, and Server Script. ExampleThe 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. | |