AccpacSession.CreateObjectHandle
Creates a new object handle to be used to launch another application. The method is also used to obtain the CLSID and codebase of the application to be launched. When an application is launched using the newly created object handle, it inherits the session information from the current session (includes authentication information, and optionally, application data).
Sub CreateObjectHandle(
ObjectID As String,
ObjectKey As String,
ObjectHandle As String,
CLSID As String,
Codebase As String)
Parameters
ObjectID
[in] the Roto ID of the application object to be launched
ObjectKey
[in] a key to be passed to the launched object
The key is a String of any format as long as it is understood by both the current application and the object to which the key is passed.
ObjectHandle
[out] returns the newly created object handle
CLSID
[out] returns the COM class ID (CLSID) of the application object
Codebase
[out] returns the codebase of the object
If the session is local, the codebase is the file path to the object's locally installed COM object.
If the session is accessing a remote ACCPAC server, the codebase is the URL of the application object's CAB file
Remarks
This method creates an object handle, but does not launch the application identified by the Roto ID. The caller is responsible for launching the desired object in an appropriate way, passing along the object handle which can be used by that object to initialize and open its own session.
The application to be launched is specified by its Roto ID. The system looks up the CLSID and generates the codebase of the application object based on this Roto ID.
The ObjectKey is a string passed to the launched application. The most common use of this is to pass the key of the initial record to display on the launched application.