Siebel Object Interfaces Reference > Interfaces Reference > Business Component Methods >
DeleteRecord removes the current record from the business component.
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:
Dim objBO as BusObject
Dim objBC as BusComp
Set objBO = TheApplication.GetBusObject("Account")
Set objBC = objBO.GetBusComp("Account")
.SetSearchSpec "Status", "Inactive"
Do While .FirstRecord
Set objBC = Nothing
Set objBO = Nothing
NOTE: The cursor is moved to the next record after DeleteRecord is executed. 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.