SPWorkItemCollection.UpdateWorkItem Method
Allows you to change the delivery date, the binary payload, or the text payload on a specified work item.
Namespace: Microsoft.SharePoint
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No
Syntax
'Declaration
Public Sub UpdateWorkItem ( _
workItemId As Guid, _
deliveryDate As DateTime, _
binaryPayload As Byte(), _
textPayload As String _
)
'Usage
Dim instance As SPWorkItemCollection
Dim workItemId As Guid
Dim deliveryDate As DateTime
Dim binaryPayload As Byte()
Dim textPayload As String
instance.UpdateWorkItem(workItemId, deliveryDate, _
binaryPayload, textPayload)
public void UpdateWorkItem(
Guid workItemId,
DateTime deliveryDate,
byte[] binaryPayload,
string textPayload
)
Parameters
workItemId
Type: System.GuidUnique identifier (GUID) of the work item you intend to update. Required.
deliveryDate
Type: System.DateTimeOptional. Updates the date-time value specifying the delivery date of the work item.
binaryPayload
Type: []Optional. Updates the byte array representing the contents of the binary payload.
textPayload
Type: System.StringOptional. Updates the string value representing the contents of the text payload.
Remarks
After the GetRunnableWorkItems query runs and you have work items in the queue, you can update only three properties. You can change the delivery date, you can change the binary payload, or you can change the text payload.
Note that if you change the delivery date by using this method, you have effectively called SPWorkItemCollection.RevertInProgressWorkItem on the work item, because the queue can no longer reliably evaluate its delivery status. You should invoke the GetRunnableWorkItems query to fetch the work item again.