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

  • localizedStartDate
    Type: System.String

    Start date in a localized string.

  • localizedDueDate
    Type: System.String

    Due date in a localized string.

  • completed
    Type: System.Boolean

    Indicates whether the task is completed.

  • pinned
    Type: System.Boolean

    Specifies whether the task is pinned (true) or not (false).

  • locationKey
    Type: System.Int32

    Specifies the task location identifier. Use -1 to specify that the task has no location.

Return value

Type: Microsoft.SharePoint.WorkManagement.Client.TaskWriteResult
Specifies the URL to edit the task.

See also

Reference

BaseSession class

BaseSession members

Microsoft.SharePoint.WorkManagement.Client namespace