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

DeleteRecord


DeleteRecord removes the current record from the business component.

Syntax

BusComp.DeleteRecord

Argument
Description
Not applicable
 

Returns

Not applicable

Used With

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

Example

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
      .ClearToQuery
      .SetSearchSpec "Status", "Inactive"
      .ExecuteQuery ForwardBackward
      Do While .FirstRecord
         .DeleteRecord
      Loop
   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.


 Siebel Object Interfaces Reference 
 Published: 18 June 2003