Friday, February 10, 2012

Pre-Delete Plugin 'Gotcha'


If you are running a plugin on the pre-operation event of the Delete message, one thing to note is that by that time CRM has already disassociated the record in context with any child records.  Therefore if you need to query for any child records relating to that record, nothing will return from your query.

A way around this would be to register your plugin in the pre-validation event.

Example query that won't return any results in pre-operation Delete of 'recurringappointmentmaster':

1 comment:

  1. I admired those who has able to create a blog as wonderful as this! You are truly a hard working person. Keep up the good work and keep on posting.

    www.imarksweb.org

    ReplyDelete