Siebel Object Interfaces Reference > Interfaces Reference > Business Component Methods >

FirstSelected


FirstSelected moves the focus to the first record of the multiple selection in the business component, invoking any associated Basic events.

Syntax

BusComp.FirstSelected

Argument
Description
Not applicable
 

Returns

An integer in Siebel VB: 1 or nonzero if there was a first record (the query returned results) and 0 if there are no records; a Boolean in Siebel eScript, COM, ActiveX, and CORBA.

Used With

Siebel VB, Siebel eScript

Example

This Siebel VB example calls the email client upon the click of a button. It uses a function, Email, that is not shown.

Sub Button1_Click
   Dim oAccounts as BusComp
   Dim oCurrAcct As BusComp, sName as String
   Dim sSendList As String, sDescription as String
   'Get the current business object
   Set oCurrAcct = TheApplication.ActiveBusComp
   With oCurrAcct
      If .FirstSelected <> 0 then
         sName = .GetFieldValue("Email Address")
         Set oAccounts = oCurrAcct
         If .FirstSelected <> 0 then
            sSendList = .GetFieldValue("Email Address")
            do while .NextSelected <> 0
               sDescription = .GetFieldValue("Email Address")
               sSendList = sSendList + ";" + sDescription
               TheApplication().RaiseErrorText(SDescription);
            loop
         end if
      end if
   End With
CallEmail(sSendList)
End Sub


 Siebel Object Interfaces Reference 
 Published: 18 June 2003