BaseSession.CreatePersonalTaskAndPromoteToProviderTask method
Creates a new personal task and then tries to promote it to the provider specified by the locationKey parameter.
Namespace: Microsoft.SharePoint.WorkManagement.Client
Assembly: Microsoft.SharePoint.WorkManagement.Client (in Microsoft.SharePoint.WorkManagement.Client.dll)
Syntax
'Declaration
<RemoteAttribute> _
Public Function CreatePersonalTaskAndPromoteToProviderTask ( _
taskName As String, _
description As String, _
localizedStartDate As String, _
localizedDueDate As String, _
completed As Boolean, _
pinned As Boolean, _
locationKey As Integer _
) 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 returnValue As TaskWriteResult
returnValue = instance.CreatePersonalTaskAndPromoteToProviderTask(taskName, _
description, localizedStartDate, _
localizedDueDate, completed, pinned, _
locationKey)
[RemoteAttribute]
public TaskWriteResult CreatePersonalTaskAndPromoteToProviderTask(
string taskName,
string description,
string localizedStartDate,
string localizedDueDate,
bool completed,
bool pinned,
int locationKey
)
Parameters
- taskName
Type: System.String
- description
Type: System.String
- localizedStartDate
Type: System.String
- localizedDueDate
Type: System.String
- completed
Type: System.Boolean
- pinned
Type: System.Boolean
- locationKey
Type: System.Int32
Return value
Type: Microsoft.SharePoint.WorkManagement.Client.TaskWriteResult
Remarks
This is a convenience method that is the equivalent of calling CreateTask and then PromotePersonalTaskToProviderTaskToLocation. The implication of this is if the location key is invalid, or the promote fails in the provider, the personal task may already have been created and will not be cleaned up. For more details on how the promote step works, please see the PromotePersonalTaskToProviderTaskToLocation method.