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.GuidThe correlation ID of the workflow operation currently executing.
listId
Type: System.GuidThe ID of the list in which to create the new item
itemKey
Type: Microsoft.SharePoint.Workflow.SPItemKeyThe 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.
itemProperties
Type: System.Collections.HashtableA Hashtable object containing properties to be set for the newly created list item.
Return Value
Type: Microsoft.SharePoint.Workflow.SPItemKey
Returns SPItemKey.