This task was delegated to more than one person. Updates will not be tracked.

  • Thread starter Thread starter Andrew
  • Start date Start date
A

Andrew

This one is a real mystery...i bet the answer is going to
be either real simple or real complex!

I have a function which creates a task item and returns
it.

The caller function (a toolbar function) takes the task,
assigns it and sends it.

On the receiving end, I get the message "This task was
delegated to more than one person. Updates will not be
tracked."

I have NO idea why I am getting this, the task is only
ever sent to 1 recipient!!!

See code below.

Anyone that could help me on this would be branded a
legend for EVER! It is SOO irritating not getting
updates on assigned tasks ... defeats the purpose of
using Outlook!

--------------------------------------------------------

Function Toolbar_ExportAsTaskAssignmentInOutlook()
Dim newTask As TaskItem
Set newTask = ExportPLMSTaskToOutlook(Me.CTitemId)
newTask.Assign
newTask.Recipients.Add GetSystemSetting
(Me.Caption, "Send Tasks to Self - Recipient Address")
newTask.Send
End Function

--------------------------------------------------------

Function ExportPLMSTaskToOutlook(CTitemId As Integer,
Optional parentName As String, Optional parentsParentName
As String)
Dim OutlookApplication As Outlook.Application
Dim OutlookTask As Outlook.TaskItem
sql = "select CurrentTasks.*,PGitemTitle from
CurrentTasks,PersonalGoals where
CurrentTasks.PGitemId=PersonalGoals.PGitemId and
CurrentTasks.CTitemId=" + Trim(Str(CTitemId))

Dim PLMSTask As ADODB.Recordset
Set PLMSTask = GetData(sql)

If PLMSTask.RecordCount > 0 Then
Set ExistingTask = GetOutlookTaskForPLMSTask(CTitemId)
If TypeName(ExistingTask) <> "Nothing" Then
Set OutlookTask = ExistingTask
Else
Set OutlookApplication = CreateObject
("Outlook.Application")
Set OutlookTask = OutlookApplication.CreateItem
(olTaskItem)
End If

With OutlookTask
.ItemProperties.Add "CTitemId", olText, False
.ItemProperties("CTitemId").Value = PLMSTask
("CTitemId")
.ItemProperties.Add "PLMS Goal", olText, True
.ItemProperties("PLMS Goal").Value = PLMSTask
("PGitemTitle")

If Not IsNull(PLMSTask("CTitemParent")) Then
.ItemProperties.Add "PLMS Task Level 2", olText,
True
.ItemProperties("PLMS Task Level 2").Value = _
IIf(parentName = "", GetParentNameForTask
(GetParentIdForTask(PLMSTask("CTitemParent"))),
parentName)
End If

If Not IsNull(PLMSTask("CTitemParent")) Then
.ItemProperties.Add "PLMS Task Level 1", olText,
True
.ItemProperties("PLMS Task Level 1").Value = _
IIf(parentName = "", GetParentNameForTask
(GetParentIdForTask(PLMSTask("CTitemParent"))),
parentParentName)
End If

.Subject = PLMSTask("CTitemName")
If Not IsNull(PLMSTask("CTitemBody")) Then
.Body = PLMSTask("CTitemBody")
End If
If Not IsNull(PLMSTask("CTitemStartDate")) Then
.StartDate = DateValue(PLMSTask("CTitemStartDate"))
End If
.DueDate = PLMSTask("CTitemDueDate")

' This may be annoying so may need to become an option
.ReminderSet = True

Select Case PLMSTask("CTitemStatus")
Case "Not Started"
.Status = olTaskNotStarted
Case "In Progress"
.Status = olTaskInProgress
Case "Waiting"
.Status = olTaskWaiting
Case "Aborted"
.Status = olTaskDeferred
Case "Complete"
.Status = olTaskComplete
End Select
Select Case PLMSTask("CTitemPriority")
Case "Very Low"
.Importance = olImportanceLow
Case "Low"
.Importance = olImportanceLow
Case "Medium"
.Importance = olImportanceNormal
Case "High"
.Importance = olImportanceHigh
Case "Very High"
.Importance = olImportanceHigh
End Select
.PercentComplete = PLMSTask("CTitemPercentComplete")
If Not IsNull(PLMSTask("CTitemDateCompleted")) Then
.DateCompleted = PLMSTask("CTitemDateCompleted")
End If
If Not IsNull(PLMSTask("CTitemActualWork")) Then
.ActualWork = PLMSTask("CTitemActualWork")
End If
If Not IsNull(PLMSTask("CTitemEstimatedWork")) Then
.TotalWork = PLMSTask("CTitemEstimatedWork")
End If
End With

ReportEvent ReportToStatusBar, "Exported PLMS task to
Outlook : [" + Trim(Str(CTitemId)) + "] '" + Left(PLMSTask
("CTitemName"), 10) + "...'"

Set OutlookApplication = Nothing
PLMSTask.Close
Set PLMSTask = Nothing
Else
ReportEvent ReportToUser, "ERROR: PLMS Task Id of
this task (" + Trim(Str(CTitemId)) + ") was not found in
the PLMS database!"
End If

Set ExportPLMSTaskToOutlook = OutlookTask
End Function
 
Hi-

I'm going to quote from the VBA Help:

" You must create a task before you can assign it, and you
must assign a task before you can send it. An assigned
task is sent as a TaskRequestItem object."

I don't see where, in your code, you create the task using
CreateItem(). Is this happening in other code you haven't
posted?

-Andrew
===========================
-----Original Message-----
This one is a real mystery...i bet the answer is going to
be either real simple or real complex!

I have a function which creates a task item and returns
it.

The caller function (a toolbar function) takes the task,
assigns it and sends it.

On the receiving end, I get the message "This task was
delegated to more than one person. Updates will not be
tracked."

I have NO idea why I am getting this, the task is only
ever sent to 1 recipient!!!

See code below.

Anyone that could help me on this would be branded a
legend for EVER! It is SOO irritating not getting
updates on assigned tasks ... defeats the purpose of
using Outlook!

--------------------------------------------------------

Function Toolbar_ExportAsTaskAssignmentInOutlook()
Dim newTask As TaskItem
Set newTask = ExportPLMSTaskToOutlook(Me.CTitemId)
newTask.Assign
newTask.Recipients.Add GetSystemSetting
(Me.Caption, "Send Tasks to Self - Recipient Address")
newTask.Send
End Function

--------------------------------------------------------

Function ExportPLMSTaskToOutlook(CTitemId As Integer,
Optional parentName As String, Optional parentsParentName
As String)
Dim OutlookApplication As Outlook.Application
Dim OutlookTask As Outlook.TaskItem
sql = "select CurrentTasks.*,PGitemTitle from
CurrentTasks,PersonalGoals where
CurrentTasks.PGitemId=PersonalGoals.PGitemId and
CurrentTasks.CTitemId=" + Trim(Str(CTitemId))

Dim PLMSTask As ADODB.Recordset
Set PLMSTask = GetData(sql)

If PLMSTask.RecordCount > 0 Then
Set ExistingTask = GetOutlookTaskForPLMSTask(CTitemId)
If TypeName(ExistingTask) <> "Nothing" Then
Set OutlookTask = ExistingTask
Else
Set OutlookApplication = CreateObject
("Outlook.Application")
Set OutlookTask = OutlookApplication.CreateItem
(olTaskItem)
End If

With OutlookTask
.ItemProperties.Add "CTitemId", olText, False
.ItemProperties("CTitemId").Value = PLMSTask
("CTitemId")
.ItemProperties.Add "PLMS Goal", olText, True
.ItemProperties("PLMS Goal").Value = PLMSTask
("PGitemTitle")

If Not IsNull(PLMSTask("CTitemParent")) Then
.ItemProperties.Add "PLMS Task Level 2", olText,
True
.ItemProperties("PLMS Task Level 2").Value = _
IIf(parentName = "", GetParentNameForTask
(GetParentIdForTask(PLMSTask("CTitemParent"))),
parentName)
End If

If Not IsNull(PLMSTask("CTitemParent")) Then
.ItemProperties.Add "PLMS Task Level 1", olText,
True
.ItemProperties("PLMS Task Level 1").Value = _
IIf(parentName = "", GetParentNameForTask
(GetParentIdForTask(PLMSTask("CTitemParent"))),
parentParentName)
End If

.Subject = PLMSTask("CTitemName")
If Not IsNull(PLMSTask("CTitemBody")) Then
.Body = PLMSTask("CTitemBody")
End If
If Not IsNull(PLMSTask("CTitemStartDate")) Then
.StartDate = DateValue(PLMSTask("CTitemStartDate"))
End If
.DueDate = PLMSTask("CTitemDueDate")

' This may be annoying so may need to become an option
.ReminderSet = True

Select Case PLMSTask("CTitemStatus")
Case "Not Started"
.Status = olTaskNotStarted
Case "In Progress"
.Status = olTaskInProgress
Case "Waiting"
.Status = olTaskWaiting
Case "Aborted"
.Status = olTaskDeferred
Case "Complete"
.Status = olTaskComplete
End Select
Select Case PLMSTask("CTitemPriority")
Case "Very Low"
.Importance = olImportanceLow
Case "Low"
.Importance = olImportanceLow
Case "Medium"
.Importance = olImportanceNormal
Case "High"
.Importance = olImportanceHigh
Case "Very High"
.Importance = olImportanceHigh
End Select
.PercentComplete = PLMSTask("CTitemPercentComplete")
If Not IsNull(PLMSTask("CTitemDateCompleted")) Then
.DateCompleted = PLMSTask("CTitemDateCompleted")
End If
If Not IsNull(PLMSTask("CTitemActualWork")) Then
.ActualWork = PLMSTask("CTitemActualWork")
End If
If Not IsNull(PLMSTask("CTitemEstimatedWork")) Then
.TotalWork = PLMSTask("CTitemEstimatedWork")
End If
End With

ReportEvent ReportToStatusBar, "Exported PLMS task to
Outlook : [" + Trim(Str(CTitemId)) + "] '" + Left(PLMSTask
("CTitemName"), 10) + "...'"

Set OutlookApplication = Nothing
PLMSTask.Close
Set PLMSTask = Nothing
Else
ReportEvent ReportToUser, "ERROR: PLMS Task Id of
this task (" + Trim(Str(CTitemId)) + ") was not found in
the PLMS database!"
End If

Set ExportPLMSTaskToOutlook = OutlookTask
End Function

.
 
Yes, the is created in the ExportPLMSTaskToOutlook inside
the first IF statement. Basically, what the code is
doing here is saying 'if there is already a task created,
update the existing task'. Obviously, this will cause
problems if the task is delegated and sent, but I will
work on that later. The problem is that when I create a
whole bunch of new task assignments and send them, the
recipient gets the "This task was delegated to more than
one person. Updates will not be tracked." message!

AAAARG!!
I am going to have to try varying the sender outlook and
the reciever outlook.
-----Original Message-----
Hi-

I'm going to quote from the VBA Help:

" You must create a task before you can assign it, and you
must assign a task before you can send it. An assigned
task is sent as a TaskRequestItem object."

I don't see where, in your code, you create the task using
CreateItem(). Is this happening in other code you haven't
posted?

-Andrew
===========================

-----Original Message-----
This one is a real mystery...i bet the answer is going to
be either real simple or real complex!

I have a function which creates a task item and returns
it.

The caller function (a toolbar function) takes the task,
assigns it and sends it.

On the receiving end, I get the message "This task was
delegated to more than one person. Updates will not be
tracked."

I have NO idea why I am getting this, the task is only
ever sent to 1 recipient!!!

See code below.

Anyone that could help me on this would be branded a
legend for EVER! It is SOO irritating not getting
updates on assigned tasks ... defeats the purpose of
using Outlook!

--------------------------------------------------------

Function Toolbar_ExportAsTaskAssignmentInOutlook()
Dim newTask As TaskItem
Set newTask = ExportPLMSTaskToOutlook(Me.CTitemId)
newTask.Assign
newTask.Recipients.Add GetSystemSetting
(Me.Caption, "Send Tasks to Self - Recipient Address")
newTask.Send
End Function

--------------------------------------------------------

Function ExportPLMSTaskToOutlook(CTitemId As Integer,
Optional parentName As String, Optional parentsParentName
As String)
Dim OutlookApplication As Outlook.Application
Dim OutlookTask As Outlook.TaskItem
sql = "select CurrentTasks.*,PGitemTitle from
CurrentTasks,PersonalGoals where
CurrentTasks.PGitemId=PersonalGoals.PGitemId and
CurrentTasks.CTitemId=" + Trim(Str(CTitemId))

Dim PLMSTask As ADODB.Recordset
Set PLMSTask = GetData(sql)

If PLMSTask.RecordCount > 0 Then
Set ExistingTask = GetOutlookTaskForPLMSTask (CTitemId)
If TypeName(ExistingTask) <> "Nothing" Then
Set OutlookTask = ExistingTask
Else
Set OutlookApplication = CreateObject
("Outlook.Application")
Set OutlookTask = OutlookApplication.CreateItem
(olTaskItem)
End If

With OutlookTask
.ItemProperties.Add "CTitemId", olText, False
.ItemProperties("CTitemId").Value = PLMSTask
("CTitemId")
.ItemProperties.Add "PLMS Goal", olText, True
.ItemProperties("PLMS Goal").Value = PLMSTask
("PGitemTitle")

If Not IsNull(PLMSTask("CTitemParent")) Then
.ItemProperties.Add "PLMS Task Level 2", olText,
True
.ItemProperties("PLMS Task Level 2").Value = _
IIf(parentName = "", GetParentNameForTask
(GetParentIdForTask(PLMSTask("CTitemParent"))),
parentName)
End If

If Not IsNull(PLMSTask("CTitemParent")) Then
.ItemProperties.Add "PLMS Task Level 1", olText,
True
.ItemProperties("PLMS Task Level 1").Value = _
IIf(parentName = "", GetParentNameForTask
(GetParentIdForTask(PLMSTask("CTitemParent"))),
parentParentName)
End If

.Subject = PLMSTask("CTitemName")
If Not IsNull(PLMSTask("CTitemBody")) Then
.Body = PLMSTask("CTitemBody")
End If
If Not IsNull(PLMSTask("CTitemStartDate")) Then
.StartDate = DateValue(PLMSTask("CTitemStartDate"))
End If
.DueDate = PLMSTask("CTitemDueDate")

' This may be annoying so may need to become an option
.ReminderSet = True

Select Case PLMSTask("CTitemStatus")
Case "Not Started"
.Status = olTaskNotStarted
Case "In Progress"
.Status = olTaskInProgress
Case "Waiting"
.Status = olTaskWaiting
Case "Aborted"
.Status = olTaskDeferred
Case "Complete"
.Status = olTaskComplete
End Select
Select Case PLMSTask("CTitemPriority")
Case "Very Low"
.Importance = olImportanceLow
Case "Low"
.Importance = olImportanceLow
Case "Medium"
.Importance = olImportanceNormal
Case "High"
.Importance = olImportanceHigh
Case "Very High"
.Importance = olImportanceHigh
End Select
.PercentComplete = PLMSTask("CTitemPercentComplete")
If Not IsNull(PLMSTask("CTitemDateCompleted")) Then
.DateCompleted = PLMSTask("CTitemDateCompleted")
End If
If Not IsNull(PLMSTask("CTitemActualWork")) Then
.ActualWork = PLMSTask("CTitemActualWork")
End If
If Not IsNull(PLMSTask("CTitemEstimatedWork")) Then
.TotalWork = PLMSTask("CTitemEstimatedWork")
End If
End With

ReportEvent ReportToStatusBar, "Exported PLMS task to
Outlook : [" + Trim(Str(CTitemId)) + "] '" + Left (PLMSTask
("CTitemName"), 10) + "...'"

Set OutlookApplication = Nothing
PLMSTask.Close
Set PLMSTask = Nothing
Else
ReportEvent ReportToUser, "ERROR: PLMS Task Id of
this task (" + Trim(Str(CTitemId)) + ") was not found in
the PLMS database!"
End If

Set ExportPLMSTaskToOutlook = OutlookTask
End Function

.
.
 
What is that call to GetSystemSetting? It doesn't look
like you're Adding any actual recipients.

-Andrew
==============================================
 
Back
Top