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

FirstRecord


FirstRecord moves the record pointer to the first record in a business component, making that record current and invoking any associated script events.

Syntax

BusComp.FirstRecord

Argument
Description
Not applicable
 

Returns

An integer in Siebel VB: 1 or non-zero 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

Server Script, Mobile/Dedicated Web Client Automation Server, COM Data Control, COM Data Server, Java Data Bean, CORBA Object Manager

Example

Here is a Siebel VB example. For the equivalent eScript example, read NextRecord.

Function BusComp_PreQuery () As Integer

   Dim I As Integer
   Dim isRecord As Integer
   I = 0
   With me
      .ClearToQuery
      .SetSearchSpec "Name", "*"
      .ExecuteQuery ForwardBackward
      isRecord = .FirstRecord
      Do While isRecord
         I = I + 1
         isRecord = .NextRecord
      Loop
   End With
   BusComp_PreQuery = ContinueOperation
End Function

See Also

NextRecord


 Siebel Object Interfaces Reference 
 Published: 18 June 2003