Partilhar via


IListItemByKeyService.CreateListItem Method

Creates a new list item in the specified list with the specified properties.

Namespace:  Microsoft.SharePoint.Workflow
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No

Syntax

'Declaration
<CorrelationInitializerAttribute> _
Function CreateListItem ( _
    id As Guid, _
    listId As Guid, _
    itemKey As SPItemKey, _
    itemProperties As Hashtable _
) As SPItemKey
'Usage
Dim instance As IListItemByKeyService
Dim id As Guid
Dim listId As Guid
Dim itemKey As SPItemKey
Dim itemProperties As Hashtable
Dim returnValue As SPItemKey

returnValue = instance.CreateListItem(id, _
    listId, itemKey, itemProperties)
[CorrelationInitializerAttribute]
SPItemKey CreateListItem(
    Guid id,
    Guid listId,
    SPItemKey itemKey,
    Hashtable itemProperties
)

Parameters

  • id
    Type: System.Guid

    The correlation ID of the workflow operation currently executing.

  • listId
    Type: System.Guid

    The ID of the list in which to create the new item

  • itemKey
    Type: Microsoft.SharePoint.Workflow.SPItemKey

    The SPItemKey of the item being created.

    Warning

    Since this method creates a new list item, the SPItemKey will not be known. In this case, this parameter value should be set to SPItemKey.Empty.

Return Value

Type: Microsoft.SharePoint.Workflow.SPItemKey
Returns SPItemKey.

See Also

Reference

IListItemByKeyService Interface

IListItemByKeyService Members

Microsoft.SharePoint.Workflow Namespace