I have a Lookup relationship from Contact to a custom object, and an "after update" trigger on Contact that deletes any of those related objects that no longer have children. There is a workflow rule on Contact that references fields from the parent object. I find that when I change the related object - i.e., reparent the Contact - and the old parent is deleted by the trigger, the save fails with the following error message:
The formula in the "TestRelatedWorkflow" rule or process is invalid due to the following: The record you attempted to access has been deleted
It seems to me that the workflow rule should be referencing the new (updated) parent object and its fields, not the old (deleted) parent. I read the trigger order of execution document carefully, and it seems to indicate that workflow rules should be evaluated after all triggers. Am I missing something? Is there a sensible workaround?
Update: this is now filed as case 09012899