Bookshelf Home | Contents | Index | PDF |
Siebel eScript Language Reference > Methods Reference > Global Methods > Create COM Object MethodThe Create COM Object method instantiates a COM object. It returns a successful COM object or an undefined object. FormatTable 81 describes the arguments for the Create COM Object method. UsageYou can configure Siebel CRM to pass any type of variable to the COM object that it calls. You must make sure the variable type is valid for the COM object. The following variable types are valid: Siebel CRM can run the Create COM Object method only in server script. It cannot run this method in browser script. A DLL that the Create COM Object method instantiates must be thread-safe. Using the Dispatch Identifier to Call a COM MethodSiebel CRM calls the method of a COM object in Siebel eScript in the same way that it calls this method in Siebel VB. In this context, a COM object is an object that the Create COM Object method instantiates. To use the DISPID (Dispatch Identifier) of a COM method to call that COM method, you make an IDispatch::Invoke call in the COM technology. To identify methods, properties, and arguments, you use the Dispatch Identifier in the IDispatch::Invoke call. You can write code that uses only the following arguments:
You cannot use Siebel eScript to call the method of a COM object that includes the LPCSTR argument for the string argument of that method. In this situation, you must use the BSTR argument. ExampleThe following example instantiates Microsoft Excel as a COM object and makes it visible: var ExcelApp = COMCreateObject("Excel.Application"); // Make Excel visible through the Application object. // Place some text in the first cell of the sheet // Save the sheet // Close Excel with the Quit method on the Application object // Clear the object from memory An application, such as Microsoft Excel, might change from version to version, so it might be necessary for you to modify your code to address these modifications. This example code was tested on Excel 2003. |
Siebel eScript Language Reference | Copyright © 2018, Oracle and/or its affiliates. All rights reserved. Legal Notices. | |