BaseSession.CreateTask method
Creates a new task.
Namespace: Microsoft.SharePoint.WorkManagement.Client
Assembly: Microsoft.SharePoint.WorkManagement.Client (in Microsoft.SharePoint.WorkManagement.Client.dll)
Syntax
'Declaration
<RemoteAttribute> _
Public Function CreateTask ( _
taskName As String, _
description As String, _
localizedStartDate As String, _
localizedDueDate As String, _
completed As Boolean, _
pinned As Boolean, _
locationKey As Integer, _
editUrl As String _
) As TaskWriteResult
'Usage
Dim instance As BaseSession
Dim taskName As String
Dim description As String
Dim localizedStartDate As String
Dim localizedDueDate As String
Dim completed As Boolean
Dim pinned As Boolean
Dim locationKey As Integer
Dim editUrl As String
Dim returnValue As TaskWriteResult
returnValue = instance.CreateTask(taskName, _
description, localizedStartDate, _
localizedDueDate, completed, pinned, _
locationKey, editUrl)
[RemoteAttribute]
public TaskWriteResult CreateTask(
string taskName,
string description,
string localizedStartDate,
string localizedDueDate,
bool completed,
bool pinned,
int locationKey,
string editUrl
)
Parameters
taskName
Type: System.StringName of the task.
description
Type: System.StringDescription of the task.
localizedStartDate
Type: System.StringStart date in a localized string.
localizedDueDate
Type: System.StringDue date in a localized string.
completed
Type: System.BooleanIndicates whether the task is completed.
pinned
Type: System.BooleanSpecifies whether the task is pinned (true) or not (false).
locationKey
Type: System.Int32Specifies the task location identifier. Use -1 to specify that the task has no location.
- editUrl
Type: System.String
Return value
Type: Microsoft.SharePoint.WorkManagement.Client.TaskWriteResult
Specifies the URL to edit the task.