We’ve tried to make this as simple as possible, but we’re using a couple of cool techniques to prevent accidental deletion of Project (and Contact) records while keeping the system unlocked. For a detailed overview of these techniques, please read Deleting Contacts for an overview of all this before reading below which just deals with project specific issues. Thanks.
Orphan Control in the Projects Table
Projects have fewer direct children than contacts do so the deletion issues are a bit simpler here. We are doing one interesting thing, however. When you enter project start and end dates in the header of the project’s record...
...you’re actually creating a related appointment record marked as a “project overview” record. This is how we get these overview dates to show up in the Gantt chart.
So, when you delete a project we want to delete these overview records as well so that they don’t persist in the Gantt chart after the project is gone. To accomplish this we’ve turned on cascading deletes in the relationship from Projects to ProjectApptOverview
We suggest you leave activity in place when we deleting projects but if you don’t want to, you can turn Cascading Deletes on from Projects to ProjectActivitySimple. You could also turn cascades on from Projects to Project_PhasesSimple to delete a project’s phases when you delete the project but we don’t recommend it.
Orphan Control Part 2: Project Phases
Our orphan control scripts restrict your ability to delete projects that have phases. However, this can get a little strange when deleting found sets. For instance, if you have both a project and all its phases in a found set and select Records / Delete All Records, one of two things will happen…
If the projects phases are ahead of it in the current sort order they will be deleted (having no phases themselves) and then the project—all its phases now deleted—will itself lack phases and be deleted.
If the phases are after the project in the sort order of the current found set the project will not be deleted: you’ll see a warning saying that you can’t delete it because it has phases, but then its phases will be deleted.
So, just make sure you’ve thought things through before you start batch deleting projects. It may be worthwhile to simply mark projects as inactive instead of deleting them.