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

DeleteRecord Method

DeleteRecord removes the current record from the business component.




Not applicable



Not applicable

Used With

COM Data Control, COM Data Server, Java Data Bean, Mobile Web Client Automation Server, Server Script


This Siebel VB example illustrates how to delete accounts with a status of Inactive.

Sub DeleteInactiveAccounts()
   Dim objBO as BusObject
   Dim objBC as BusComp

   Set objBO = TheApplication.GetBusObject("Account")
   Set objBC = objBO.GetBusComp("Account")
   With objBC
      .SetSearchSpec "Status", "Inactive"
      .ExecuteQuery ForwardBackward
      Do While .FirstRecord
   End With
   Set objBC = Nothing
   Set objBO = Nothing
End Sub

NOTE:  The cursor is moved to the next record after DeleteRecord is executed. Therefore, it is not necessary to execute NextRecord after DeleteRecord. Do not use NextRecord after DeleteRecord in a loop because this causes the deletion of the last record in the loop to be skipped. If you use DeleteRecord on the last record, the cursor points to nothing.

Siebel Object Interfaces Reference