Prevent a Task from being deleted or lock certain Tasks
-
2012年4月10日 17:15
Hello, I have requirement where there are certain Tasks in a Project 2010 project plan that we would like to lock down and prevent from a user deleting. These tasks could be summary Tasks.
The intent would be that in our project template we would identify all the tasks and lock them down, then users would populate their project plans based on this template.
Could some one advise of a way to prevent deletion of certain tasks?
thank you very much, mark
Mark A. Eckert SharePoint Consultant Pharmica Consulting, Inc.
所有回覆
-
2012年4月10日 17:32版主
The only way to do this would be to have some VBA code in Project Pro that would capture the Task delete event NOT allow the deletion if the task met certain criteria.
Short of that you have to trust your project managers to leave certain tasks in place.
Brian Kennemer - Project MVP
DeltaBahn Senior Architect
endlessly obsessing about Project Server…so that you don’t have to.
Blog | Twitter | LinkedIn- 已標示為解答 Jan De Messemaeker - Project MVPMVP, Moderator 2012年4月11日 7:24
-
2012年4月10日 17:42版主
Hi Mark,
As such there is no way to lock the tasks from deletion; this could be a process need that you need to make your users aware of.
You can keep initial copy of the plan before giving it to users to populate with their other tasks, later on to identify the addition or deletion of tasks you can run the Version Comparison utility (Compare Project) built in the Project. Also, UID is unique field that gives a hint on deleted tasks. Say if there was a task with UID 4 that is deleted by a user in a project of 10 tasks, any new addition of tasks pick of next UID here 11 but not 4. So deleted tasks UID could be a way to find that some tasks are deleted; but UID can't give you other info about the deleted tasks.
http://epmsource.com/2009/10/15/new-compare-projects-report-in-project-2010/
Sapna S
- 已編輯 Sapna Shukla - Project MVPMVP, Moderator 2012年4月10日 18:10
-
2012年4月10日 18:11
Thank you both.
Brian, just to clarify, are you suggesting Application level event for ProjectBeforeTaskDelete. Or another means capturing the Task delete event?
thanks a lot, just want to ensure i am covering all my options.
Mark A. Eckert SharePoint Consultant Pharmica Consulting, Inc.
-
2012年4月10日 19:37版主
Hi Mark,
Yes, that's the one. I know of no other. Project events do not have a Cancel statement, application events do.
Greetings,
- 已標示為解答 Mark A. Eckert 2012年4月10日 19:49
-
2012年4月10日 19:49Great, thanks everyone.
Mark A. Eckert SharePoint Consultant Pharmica Consulting, Inc.
-
2012年4月10日 20:10版主
Yes. That one should let you cancel.
Let me know if you have any questions. It is not the most straightforward of events to setup but once you have done it once it is easy.
The only real weak spot in this besides having to add these events to your global MPT file is that it will likely depend on a custom field for the criteria and that means that the users you already dont trust to not delete the tasks would now have to be trusted to not change the value of the field you use to make sure they cannot delete the tasks!!! :-) to be 100% certain you would need to also add code to the Application taskchange event to make sure that the field is not changing. That can get pretty heavy, in that it fires MANY times and even a small bit of code there can cause performance slow downs.
Hopefully you will not feel you need to check that field. ;-)
Brian Kennemer - Project MVP
DeltaBahn Senior Architect
endlessly obsessing about Project Server…so that you don’t have to.
Blog | Twitter | LinkedIn- 已標示為解答 Mark A. Eckert 2012年4月11日 14:32
-
2012年4月11日 14:32Thanks Brian, good points. I will have to review that with my client to see if we need to go that deep, my hope is that we do not need to be 100% bullet proof, but just make it so that field criteria that we are using is not real obvious to the user. thanks for your advice. mark
Mark A. Eckert SharePoint Consultant Pharmica Consulting, Inc.