When you are creating a plugin that must perform certain actions on the Delete message, you might at times try to make changes to the associated records of the records that is being deleted. When you call the Delete message using either the Pre-Operation or Post-Operation events, the associations to the underlying related records are deleted before the actual records is deleted.
When you are creating a plugin that must perform certain actions on the Delete message, you might at times try to make changes to the associated records of the records that is being deleted. When you call the Delete message using either the Pre-Operation or Post-Operation events, the associations to the underlying related records are deleted before the actual records is deleted.
If you will try to query one of the related records, you will not get any results.
In order to solve this problem, we need to set the event of the Delete Message to Pre-Validation, and we can then call all the related records that we want to make changes to.