ITrkItem.DeleteItemEx (method)

method DeleteItemEx
Syntax: Boolean = object.DeleteItemEx ( nDisposition )
nDisposition As TrkItemDeleteDisposition -
The TrkItem.DeleteItemEx method deletes the PRT Item associated with TrkItem Object.
TrkItem.CommitChanges Should not be done after calling this method.
Calling TrkItem.CommitChanges on the Object after calling DeleteItemEx may have unexpected resluts.


Dim iAgent As Object, iItems as Object, iItem as Object
Set iAgent = CreateObject("Tracker.TrkItemAgent")
iAgent.ItemID = "M0110"
iAgent.Execute iItems
If iItems.Count > 0 Then
Set iItem = iItems.Item(1)
If iItem.DeleteItemEx(TrkItemDeleteDisposition.enumSCRAP) = True Then
MsgBox "Deleted"
MsgBox "Delete Failed"
End If
End If
Set iItem = Nothing
Set iItems = Nothing
Set iAgent = Nothing