Quantcast
Channel: Microsoft Dynamics CRM Forum - Recent Threads
Viewing all articles
Browse latest Browse all 82002

How to log plugin error to custom entity?

$
0
0

I am working with CRM Online and would like to log plugin errors to a new Error entity.  I created the new Error entity where I can log the error message along with the plugin that caused the error.  I also created the plugin, in this particular case the plugin executes during an Acount Create event, it calls an external web service and expects a response back with some data.  If the web service call or any other part of the plugin fails, I want to log that error to the Error entity and also prevent the Account from creating.  This is where the problem arises.  I have the proper code to create a new record on the Error entity, but the problem is that by preventing the Create from happening, the transaction is rolled back, which means the Error entity record is also rolled back.  Does anyone know of a way around this?  Basically I need to create a new Error entity record AND prevent the Account from saving.

Thanks.


Viewing all articles
Browse latest Browse all 82002

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>