What could cause this plugin to work only in debug mode?
I created a C# plugin for on-premise CRM. I register the assembly in "sandbox" mode because eventually this CRM will be hosted online and my plugins must work in that environment.
The plugin code checks several fields and can cause the modified contact record to update multiple times such that workflow processes in CRM will trigger.
With the plugin registered, I update a contact record and the expected updates do not happen.
I did the following:
- started profiling on my plugin step
- changed a contact and saved
- saved the error text
- stopped profiling
- started debug
- attach Visual Studio
- step through the code
- 2 updates to the contact record are initiated by the code
- 2 updates to the contact record occur in CRM which I verify by viewing the record in the browser
- the plugin code finishes with no exceptions
Registration info:
I add a step to handle the update message and watch for a single field to change.
*This post is locked for comments