Queue


RemoveItem

Remove Item from Queue

Call Method
[VB.NET]
   Function RemoveItem (QueueObjID As String, QueueItemID As String) As bool
Parameters
   QueueObjID
         Queue Object ID
   QueueItemID
         Queue Item ID
Return value
         Returns True If Queue was Removed Successfully
VB.NET Example Switch to language: [C#]
  'Create personalizer object and Session object
  Dim pers As New PersonalizerRef.Personalizer()
  Dim sess As New SessionRef.Session()
  Dim SessionID As String = ""
  Try
      SessionID = pers.CreateSession("LogonName", "Password")
      'Create Fax notification object
      Dim objFax As New FaxRef.Fax()
      ' Create server notification object
      'Let suppose you have put fax document in the queue and got queue item ID
      Dim sQueueItemId As String = "18d7f93b476fa98726"
      'Retrieve Status of enqueued fax document
      Dim oQueue As New QueueRef.Queue()
      Dim sQueueId As String = sess.GetQueue(SessionID)
      If oQueue.GetItemStatus(sQueueId, sQueueItemId) ="Waiting" Then
          '--- if document still in Waiting status then remove it form the queue ---
          If oQueue.RemoveItem(sQueueId, sQueueItemId) Then
              'Do something if item is successfully removed
          Else
              'Do something if item removing failed
          End If
      End If
      objFax.Release(FaxNotifID)
      sess.Release(SessionID)
  Catch e As Exception
      'Print exception message e.Message
      sess.Release(SessionID)
  End Try