Bookshelf Home | Contents | Index | PDF |
Siebel Object Interfaces Reference > Interfaces Reference > Business Component Methods > InvokeMethod MethodInvokeMethod calls the specialized method or user-created method named in the argument. VB SyntaxBusComp.InvokeMethod methodName, methodArgs
eScript SyntaxBusComp.InvokeMethod(methodName, methArg1, methArg2, ..., methArgn); ReturnsA string containing the result of the method UsageUse 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. Oracle does not support calling specialized methods with InvokeMethod, unless they are listed in this book. Used WithCOM Data Control, COM Data Server, Java Data Bean, Mobile Web Client Automation Server, Server Script ExampleFor examples of the usage of InvokeMethod, see ClearLOVCache Method, CreateFile Method, GetFile Method, and PutFile Method. InvokeMethod Methods for the Business Component ObjectSiebel applications provide multiple methods for performing useful operations, such as manipulating files stored in the Siebel File System and refreshing records and business components. These methods can be invoked using server script (Siebel VB, eScript) or using one of the programmatic interfaces (Mobile Web Client Automation Server - connected mode only, COM Data Control, Java Data Bean). The following methods are available for use with InvokeMethod:
The methods available for manipulating the file system (CreateFile, GetFile, and PutFile) always store the file to or retrieve the file from the file system local to the server on which the script is being executed. For example, if you construct a Java client using the Java Data Bean to manipulate the file system, all files must be accessible from the Siebel Server. You can use UNC naming conventions (for example: \\server\dir\file.txt) or standard DOS directories (for example: D:\dir\file.txt) for file access, but the UNC path or mounted file system must be accessible to the Siebel Server. These methods do not serialize the files from a remote client and place them in the Siebel file system. Methods that manipulate files are available for business components whose Class is 'CSSBCFile'. The methods can be accessed using COM Data Control, Java Data Bean, Mobile Web Client Automation Server, and Server Script. ClearLOVCache MethodThis method clears the object manager list of values (LOV) cache, functioning similarly to the Clear Cache button in the Administration - Data > List of Values view. NOTE: ClearLOVCache clears only the object manager cache, not the session cache in the High Interactivity client. SyntaxBusComp.InvokeMethod("ClearLOVCache") ReturnsUsed WithThis method is supported by BusComp.InvokeMethod() calls in Browser Script, COM Data Control, COM Data Server, Java Data Bean, Mobile Web Client Automation Server, and Server Script. ExampleThe following Siebel eScript example is for Server Script: function WebApplet_PreInvokeMethod (MethodName) if (MethodName == "TestMethod") { var lov_bo = TheApplication().GetBusObject("List Of Values"); var lov_bc = lov_bo.GetBusComp("List Of Values"); lov_bc.SetFieldValue("Type", "ACCOUNT_STATUS"); lov_bc.SetFieldValue("Name", "Hello"); lov_bc.SetFieldValue("Value", "Hello"); lov_bc.SetFieldValue("Order By", "12"); lov_bc.SetFieldValue("Translate", "Y"); lov_bc.InvokeMethod("ClearLOVCache"); CreateFile MethodTo create a file in the Siebel file system from an external source, use the business component CreateFile method. Before calling CreateFile, make sure that a new business component record has been created using the NewRecord method for the business component. SyntaxBusComp.InvokeMethod("CreateFile", SrcFilePath, KeyFieldName, KeepLink) ReturnsA string containing the value "Success" or "Error" depending on whether or not the operation succeeded. Used WithThis method is supported by BusComp.InvokeMethod() calls in COM Data Control, COM Data Server, Java Data Bean, Mobile Web Client Automation Server, and Server Script. ExampleThe following example is in Siebel VB: Dim RetValue as String 'Instantiate fileBC as the appropriate attachment business component fileBC.NewRecord NewAfter The following example is in Siebel eScript: // Instantiate fileBC as the appropriate attachment business component fileBC.NewRecord(NewAfter); The following example is in COM Data Control: Dim errCode as Integer 'Instantiate fileBC as the appropriate attachment business component Args(0) = "C:\Demo\Image.bmp" fileBC.NewRecord NewAfter, errCode GenerateProposal MethodGenerateProposal creates a new proposal record. The DocServer handles the work of generating the actual proposal. SyntaxTo specify a template: To use the default proposal template: Used WithThis method is supported by BusComp.InvokeMethod() calls in Browser Script, COM Data Control, COM Data Server, Java Data Bean, Mobile Web Client Automation Server, and Server Script. GetFile MethodObtains a file from the Siebel file system and places that file on the local file system of the Siebel Server or Mobile Client. Note that you must be properly positioned on the desired file attachment record to get the file and have it placed on the local file system's temporary directory. SyntaxBusComp.InvokeMethod("GetFile", KeyFieldName)
ReturnsA string containing "Success, <OutFilePath>" if the operation succeeded. OutFilePath is the fully qualified path of the file on the Client/Server machine in the user's temp directory. The return value is "Error" if the operation failed. Used WithThis method is supported by BusComp.InvokeMethod() calls in COM Data Control, COM Data Server, Java Data Bean, Mobile Web Client Automation Server, and Server Script. ExampleThe following example uses Siebel VB: Dim RetValue as String 'Instantiate fileBC as the appropriate attachment business component 'Query for the desired attachment record RetValue = fileBC.InvokeMethod ("GetFile", "AccntFileName") The following example uses Siebel eScript: // Instantiate fileBC as the appropriate attachment business component // Query for the desired attachment record var RetValue = fileBC.InvokeMethod("GetFile", "AccntFileName"); The following example uses COM Data Control: Dim errCode as Integer 'Instantiate fileBC as the appropriate attachment business component 'Query for the desired attachment record Args = "AccntFileName" PutFile MethodUpdates a file in the Siebel file system with a newer file. Note that you must be properly positioned on the desired file attachment record to update the file in the file system. SyntaxBusComp.InvokeMethod("PutFile", SrcFilePath, KeyFieldName) ReturnsA string containing the values of "Success" or "Error" depending on whether or not the operation succeeded. UsageAfter using PutFile to save a file attachment the updated attachment is not visible in the user interface until you call the WriteRecord method. For more information about WriteRecord, read WriteRecord Method. Used WithThis method is supported by BusComp.InvokeMethod() calls in COM Data Control, COM Data Server, Java Data Bean, Mobile Web Client Automation Server, and Server Script. ExampleThe following example uses Siebel VB: Dim RetValue as String 'Instantiate fileBC to the appropriate attachment business component 'Query for the attachment record to be updated RetValue = fileBC.InvokeMethod ("PutFile", "c:\Demo\Image.bmp", "AccntFileName") The following example uses Siebel eScript: // Instantiate fileBC to the appropriate attachment business component // Query for the attachment record to be updated RetValue = fileBC.InvokeMethod("PutFile", "c:\\Demo\\Image.bmp", "AccntFileName"); The following example uses COM Data Control: Dim errCode as Integer 'Instantiate fileBC to the appropriate attachment business component 'Query for the attachment record to be updated Args(0) = "C:\Demo\Image.bmp" RefreshBusComp MethodThis method re-executes the current query for the business component and places the focus back onto the record that was previously highlighted. The user sees that the data is refreshed but the same record is still highlighted in the same position in the list applet as before the RefreshBusComp method was invoked. SyntaxBusComp.InvokeMethod("RefreshBusComp") ReturnsUsed WithThis method is supported by BusComp.InvokeMethod() calls in Browser Script, COM Data Control, COM Data Server, Java Data Bean, Mobile Web Client Automation Server, and Server Script. NOTE: This method only works with business components that are derived from CSSBCBase. RefreshRecord MethodThis method refreshes the currently highlighted record, which triggers an update of the business component fields in the client display and positions the cursor on the context record. Other records currently exposed in the user interface are not refreshed. SyntaxretVal = BusComp.InvokeMethod("RefreshRecord") ReturnsUsed WithThis method is supported by BusComp.InvokeMethod() calls in Browser Script, COM Data Control, Java Data Bean, Mobile Web Client Automation Server, and Server Script. NOTE: This method only works with business components that are derived from CSSBCBase. SetAdminMode MethodThis method is particularly useful if you need to replicate the behavior enforced by the 'Admin' property of the View object by disabling all visibility rules for the business component. SyntaxBusComp.InvokeMethod("SetAdminMode", flag) ReturnsUsed WithThis method is supported by BusComp.InvokeMethod() calls in COM Data Control, COM Data Server, Java Data Bean, Mobile Web Client Automation Server, and Server Script. |
Siebel Object Interfaces Reference | Copyright © 2008, Oracle. All rights reserved. | |