M
MichaelA
Hello All,
I am wanting to run a small macro that runs each time a new task is
created. I assume the right event is "ProjectNewTask" which takes a
project and and ID as parameters. First, is this the right event or
should I use "ProjectBeforeNewTask".
Depending on the name.value of the parent of the new task I then want
to set a custom field to a boolean value.
The event is passing the project itself (pj as project) and the ID of
the task that triggered the event (ID as long).
Now I want to test if the name of the parent task is equal to some
value:
If pj.Tasks.Parent.Name = "Issues" Then '<< This does not
work
SetTaskField Field:="Flag20", Value:="yes", TaskID:=ID
End If
Given the error, I now think that I have to reference the specific
task using tasks(index) but have no way of knowing what the index of
the new task is.
Would anyone know how I could find out the name value of the parent
task when a new task event is triggered? I think I am close.
Thanks and regards
Michael A.
I am wanting to run a small macro that runs each time a new task is
created. I assume the right event is "ProjectNewTask" which takes a
project and and ID as parameters. First, is this the right event or
should I use "ProjectBeforeNewTask".
Depending on the name.value of the parent of the new task I then want
to set a custom field to a boolean value.
The event is passing the project itself (pj as project) and the ID of
the task that triggered the event (ID as long).
Now I want to test if the name of the parent task is equal to some
value:
If pj.Tasks.Parent.Name = "Issues" Then '<< This does not
work
SetTaskField Field:="Flag20", Value:="yes", TaskID:=ID
End If
Given the error, I now think that I have to reference the specific
task using tasks(index) but have no way of knowing what the index of
the new task is.
Would anyone know how I could find out the name value of the parent
task when a new task event is triggered? I think I am close.
Thanks and regards
Michael A.