Siebel Object Interfaces Reference > Interfaces Reference > Business Component Events >

BusComp_Query Event

The Query event is called just after the query is complete and the rows have been retrieved, but before the rows are actually displayed.




Not applicable



Not applicable

Used With

Server Script


In this Siebel VB example, important information is defined using the Action business component with a special activity type. If the user starts an account query, the code checks whether important information is available. If so, the information is displayed 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
         .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)
         End If
      End With
   End If


   Set oCurrFinAct = Nothing
   set oBusObj = Nothing

End Sub

Siebel Object Interfaces Reference