共用方式為


SPWorkItemCollection.UpdateWorkItem method

可讓您變更,例如交付日期、 二進位的內容或在指定的工作項目上的文字內容。

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

'宣告
Public Sub UpdateWorkItem ( _
    workItemId As Guid, _
    deliveryDate As DateTime, _
    binaryPayload As Byte(), _
    textPayload As String _
)
'用途
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
)

參數

  • workItemId
    Type: System.Guid

    您想要更新工作項目的唯一識別項 (GUID)。必要的。

  • deliveryDate
    Type: System.DateTime

    選擇性的。更新指定的工作項目,例如交付日期的日期時間值。

  • binaryPayload
    Type: []

    選擇性的。更新代表的二進位裝載內容的位元組陣列。

  • textPayload
    Type: System.String

    選擇性的。更新字串值,表示文字裝載的內容。

備註

執行GetRunnableWorkItems查詢,並可在佇列中的工作項目之後,您可以更新只有三個屬性。您可以變更,例如交付日期,您可以變更二進位的內容,或者您可以變更文字內容。

請注意是否您可以使用這個方法,以變更,例如交付日期,您有有效的工作項目上呼叫SPWorkItemCollection.RevertInProgressWorkItem因為佇列可以不再可靠地評估其傳遞狀態。您應該叫用GetRunnableWorkItems查詢一次擷取工作項目。

請參閱

參照

SPWorkItemCollection class

SPWorkItemCollection members

Microsoft.SharePoint namespace

SPWorkItemCollection.RevertInProgressWorkItem