Application_Start Event
Siebel CRM calls the Application_Start event when the Siebel client starts and again when it displays the client interface for the first time. This event does not return any information.
Caution: Do not use the RaiseErrorText method in the Application_Start
event. The RaiseErrorText method does not work in the Application_Start
event, and can cause the Application Object Manager to abort.
Format
Application_Start(commandline)
The following table describes the arguments for the Application_Start event.
Argument | Description |
---|---|
commandline |
Text of the command line that starts the Siebel application. |
Siebel Business Processes call this event. For more information, see Siebel Business Process Framework: Workflow Guide.
Used With
Server Script
Examples
This example Siebel VB code returns the first and last name of the user who logs in to the Siebel application:
Sub Application_Start(CommandLine As String)
Dim oEmpBusObj as BusObject
Dim oEmpBusComp as BusComp
Dim oEmpBusComp as BusComp
Dim sLoginName as String
Dim sUserName as String
sLoginName = TheApplication.LoginName
Set oEmpBusObj = TheApplication.GetBusObject("Employee")
Set oEmpBusComp = oEmpBusObj.GetBusComp("Employee")
With oEmpBusComp
.ActivateField "First Name"
.ActivateField "Last Name"
.ClearToQuery
.SetSearchSpec "Login Name", sLoginName
.ExecuteQuery
If (.FirstRecord = 1) Then
sUserName = .GetFieldValue("First Name")
sUserName = sUserName + " " + .GetFieldValue("Last Name")
End If
End With
Set oEmpBusComp = Nothing
Set oEmpBusObj = Nothing
End Sub