CreateItemActivity.Execute Method
Creates a new item in the specified list or document library.
Namespace: Microsoft.SharePoint.WorkflowActions.WithKey
Assembly: Microsoft.SharePoint.WorkflowActions (in Microsoft.SharePoint.WorkflowActions.dll)
Syntax
'Declaration
Protected Overrides Function Execute ( _
context As ActivityExecutionContext _
) As ActivityExecutionStatus
'Usage
Dim context As ActivityExecutionContext
Dim returnValue As ActivityExecutionStatus
returnValue = Me.Execute(context)
protected override ActivityExecutionStatus Execute(
ActivityExecutionContext context
)
Parameters
context
Type: System.Workflow.ComponentModel.ActivityExecutionContextThe context that is associated with this activity.
Return Value
Type: System.Workflow.ComponentModel.ActivityExecutionStatus
The status of the activity.
Remarks
The workflow runtime calls this override to create a new item on the specified list or document library and caches the item before it is committed to the database. After successfully creating the item, this override stores the item ID in the NewItemId property.
If a document with the same name already exists in the specified document library, this override overwrites the document if the value of the Overwrite property is true.