Siebel Object Interfaces Reference > Interfaces Reference > Business Component Methods >
FirstSelected moves the focus to the first record of the multiple selection in the business component, invoking any associated Basic events.
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 ActiveX, COM, and Siebel eScript.
COM Data Server, Server Script
The following examples show how the FirstSelected method could be used in conjunction with the NextSelected method to provide custom multirecord deletion functionality. This code could be triggered in respect to the user invoking the Delete Selected custom method, when pressing a custom button on an applet.
The following example is in Siebel eScript:
function BusComp_PreInvokeMethod (MethodName)
if (MethodName == "Delete Selected")
var iRecord = FirstSelected();
iRecord = NextSelected();
The following example is in Siebel VB:
Function BusComp_PreInvokeMethod (MethodName As String) As Integer
Dim iRtn As Integer
iRtn = ContinueOperation
If MethodName = "Delete Selected" Then
Dim iRecord As Integer
iRecord = .FirstSelected
iRecord = .NextSelected
iRtn = CancelOperation
BusComp_PreInvokeMethod = iRtn