Application Methods for COM Data Server

The following table describes a summary of application methods you can use with COM Data Server. It does not include object interface methods that Siebel CRM does not call directly from an application object. For information about methods that Siebel CRM calls with the InvokeMethod method on an application object, see LoadObjects Method for an Application.

Method Description Format

CurrencyCode Method for an Application

Returns the currency code that is associated with the division of the user position.

Dim application as SiebelApplication

Dim sCur as String

sCur = Application.CurrencyCode(ErrCode as Integer)

GetBusObject Method for an Application

Creates a new instance of a business object.

Dim application as SiebelApplication

Dim busObject as SiebelBusObject

set busObject = application.GetBusObject(busobjName as String, ErrCode as Integer)

GetLastErrText Method for an Application

Returns the text message for the error that Siebel CRM logged most recently.

Dim application as SiebelApplication

Dim sText as String

sText = application.GetLastErrText(ErrCode as Integer)

GetProfileAttr Method for an Application

Returns the name of an attribute in a user profile.

Dim application as SiebelApplication

Dim sText as String

sText = application.GetProfileAttr(Name as String)

GetService Method for an Application

Locates a business service. If this business service is not already running, then Siebel CRM starts it.

Dim Application as SiebelApplication

Dim Service as SiebelService

set Service = Application.GetService(serviceName as String, ErrCode as Integer)

GetSharedGlobal Method for an Application

Returns the shared global variables.

Dim application as SiebelApplication

Dim sName as String

sName = application.GetSharedGlobal(varName as String, ErrCode as Integer)

InvokeMethod Method for an Application

Calls a method.

Dim application as SiebelApplication

application.InvokeMethod(methodName as String, methArg1, methArg2, methArgN as String or StringArray)

LoadObjects Method for an Application

Starts the COM Data Server.

Dim application as SiebelApplication

application.LoadObjects(pathName\cfgFileName as String, ErrCode as Integer)

Login Method for an Application

Allows an external application to log in to the COM Data Server, COM Data Control, or Siebel Java Data Bean, and to access Siebel objects.

Dim application as SiebelApplication

application.Login(userName as String, password as String, ErrCode as Integer)

LoginId Method for an Application

Returns the login ID of the user who started the Siebel application.

Dim application as SiebelApplication

Dim sID as String

sID = application.LoginId(ErrCode as Integer)

LoginName Method for an Application

Returns the login name of the user who started the Siebel application.

Dim application as SiebelApplication

Dim sUser as String

sUser = application.LoginName(ErrCode as Integer)

NewPropertySet Method for an Application

Creates a new property set.

Dim oApplication as SiebelApplication

Dim oPropSet as SiebelPropertySet

oPropSet = oApplication.NewPropertySet()

PositionId Method for an Application

Returns the position ID of the user position.

Dim application as SiebelApplication

Dim sRow as String

sRow = application.PositionId(ErrCode asInteger)

PositionName Method for an Application

Returns the name of the current user position.

Dim application as SiebelApplication

Dim sPosition as String

sPosition = application.PositionName(ErrCode as Integer)

SetPositionId Method for an Application

Sets the active position to a position ID.

Dim application as SiebelApplication

Dim posId as String

Dim status as Boolean

status = application.SetPositionId(posId as String, ErrCode as Integer)

SetPositionName Method for an Application

Sets the active position to a position name.

Dim application as SiebelApplication

Dim posName as String

Dim status as Boolean

status = application.SetPositionName(posName as String, ErrCode as Integer)

SetProfileAttr Method for an Application

Personalization uses this method to set a value for an attribute in a user profile.

Dim application as SiebelApplication

application.SetProfileAttr(name as String, value as String, ErrCode as Integer)

SetSharedGlobal Method for an Application

Sets a shared global variable.

Dim application as SiebelApplication

application.SetSharedGlobal(varName as String, value as String, ErrCode as Integer)

Trace Method for an Application

Appends a message to the trace file.

Dim application as SiebelApplication

application.Trace(message as String, ErrCode as Integer)

TraceOff Method for an Application

Turns off tracing.

Dim application as SiebelApplication

application.TraceOff(ErrCode as Integer)

TraceOn Method for an Application

Turns on tracing.

Dim application as SiebelApplication

application.TraceOn(filename as String, type as Integer, Selection as String, ErrCode as Integer)