title: Dynamics CRM Detect if Delete Message is Cascade Delete
body: <p>I have a custom workflow activity that runs on delete of a custom entity.<br>
  I need to ascertain whether the delete message is a regular delete or a cascade delete from the parent entity (Opportunity).<br></p>
  
  <p>I have found that the parent entity exists even when there is a cascade delete.<br></p>
  
  <p>What else could I look at to find out if the delete is a result of a cascade delete?</p>
  
  <p>I need to do get this info because the custom entity is updating the parent entity on delete - it should only update when the delete is not a result of a cascade delete, otherwise an SQL error is occurring, it is probably due to the fact that the workflow is trying to update a record that is being deleted in the transaction.</p>
  
  <p>EDIT</p>
  
  <p>Tanguy T <a href="http://social.microsoft.com/Forums/en-US/d1ec6173-9f31-4cfe-a494-520d7c430496/crm-2011-plugins-detect-if-deletion-is-from-cascade-or-from-direct-delete?forum=crmdevelopment" rel="nofollow">asked the same question here</a>, but it was not resolved.</p>