BusComp_Query Event
Siebel CRM calls the BusComp_Query event after it completes a query but before it displays the query results. This event does not return any information.
Format
BusComp_Query
No arguments are available.
Used With
Server Script
Examples
In the following Siebel VB example, the Action business component uses a special activity type. If the user starts an account query, then this code determines if important information is available. If it is available, then Siebel CRM displays it in a message box:
Sub BusComp_Query
Dim oBusObj As BusObject, oCurrFinAct As BusComp,
Dim oActivities as BusComp, oAppl as Applet
Dim sName as String, sDescription as String
On error goto leave
set oBusObj = TheApplication.ActiveBusObject
Set oCurrFinAct = TheApplication.ActiveBusComp
If oCurrFinAct.FirstRecord <> 0 then
sName = oCurrFinAct.GetFieldValue("Name")
Set oActivities = oBusObj.GetBusComp("Finance _
Important Info Activity")
With oActivities
.ActivateField("Description")
.ClearToQuery
.SetSearchSpec "Account Name", sName
.SetSearchSpec "Type", "Important Info"
.ExecuteQuery ForwardOnly
If .FirstRecord <> 0 then
sDescription = .GetFieldValue("Description")
TheApplication.Trace("Important Information: " + sDescription)
do while .NextRecord <> 0
sDescription = .GetFieldValue("Description")
TheApplication.Trace("Important Information: " + sDescription)
loop
End If
End With
End If
leave:
Set oCurrFinAct = Nothing
set oBusObj = Nothing
End Sub