NOTE A DLL that the Create COM Object method instantiates must be thread safe

Note a dll that the create com object method

This preview shows page 154 - 156 out of 334 pages.

NOTE: A DLL that the Create COM Object method instantiates must be thread-safe. Using the Dispatch Identifier to Call a COM Method Siebel 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 use only the following arguments: BSTR (basic string). An eScript string. VARIANT. A universal data type. SAFEARRAY. Similar to a typical C array, but also includes information about the number of elements in the array. 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. Example The 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. ExcelApp.Visible = true; ExcelApp.WorkBooks.Add(); // Place some text in the first cell of the sheet ExcelApp.ActiveSheet.Cells(1,1).Value = "Column A, Row 1"; // Save the sheet var fileName = "C:\\demo.xls"; ExcelApp.ActiveWorkbook.SaveAs (fileName); // Close Excel with the Quit method on the Application object ExcelApp.Application.Quit(); // Clear the object from memory ExcelApp = null; return (CancelOperation); NOTE: Because an application such as Microsoft Excel might change from version to version, it might be necessary to change your code to address these changes. This example code was tested on Excel 2003.
Image of page 154
Methods Reference Global Methods Siebel eScript Language Reference Version 8.1, Rev. A 155 Get Array Length Method The Get Array Length method returns the length of a dynamically created array. This method is unique to Siebel eScript. For more information, see “Make Sure the JavaScript Interpreter Can Run a Function” on page 59 . Note the following: You can use the Get Array Length method only with a dynamically created array. You cannot use it with an array that is not created with the Array constructor and the new operator. The length property is not available for a dynamically created array. A dynamically created array must use the Get Array Length method or the Set Array Length method when working with an array length. If you work with an array that the array constructor and the new operator creates, then you must use the length property of the array. For more information, see “Use Caution If You Define an Array That Includes a Negative Index” on page 156 .
Image of page 155
Image of page 156

You've reached the end of your free preview.

Want to read all 334 pages?

  • Summer '16
  • Oracle
  • Type system, Siebel, Siebel eScript

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern

Ask Expert Tutors You can ask You can ask ( soon) You can ask (will expire )
Answers in as fast as 15 minutes