locked
how to skip plugin logic? RRS feed

  • Question

  • Hello - I have a PreCaseUpdate plugin and a PostCaseUpdate plugin.  In my PostCaseUpdate plugin I'm calling an external web service and I need to update new_extwscalled to true so the external web service does not get called again.

    However, to update this field in PostCaseUpdate I need to update the case through the org service after setting the field value.  This means that PreCaseUpdate and PostCaseUpdate plugins will get called again.  These plugins have a lot of logic which requires a lot of processing which creates a performance hit.  Therefore, I'm trying to figure out the best way to update a value through the org service but skip the plugins since the plugin logic is not needed - only the single field update.

    Does the org service provide a built-in way to do this?  For example, orgService.Update(entity, false), where false would tell CRM to skip the plugins?  I can implement a custom approach with a field named new_skipplugins but this would only work for PreCaseUpdate because I would not be able to reset this indicator in PostCaseUpdate.
    Wednesday, March 12, 2014 2:24 AM

All replies