1
votes

I have a Plugin on the Creation, Updating, and Deletion of the OpportunityProduct entity in the CRM 2011. I want to through exception on the success of some operations, means want to display dialog. It is working fine for Update and Delete. But it is not working fine for the Creation of OpportunityProduct, it is not throwing exception in the dialog. It is showing Exception: “An error has occurred, Try this action again. If the problem continues, check the Microsoft Dynamics CRM Community for solution or contact your organization’s Microsoft Dynamics CRM Administrator. Finally, you can contact Microsoft Support.

  1. Message : Create
  2. Primary Entity : opportunityproduct
  3. Action: Pre-Operation
  4. Execution Mode: Synchronous
1
Can you please show your code.Scorpion
This error appears to be from the platform, not getting thrown during plug-in execution. If you disable the plug-in step does the error still occur?Nicknow
No it is not showing error if i disabled the plugin step. i have also check tracing using tracing service and enable platform tracing using the crmdiagtool. it is working fine, but when i forcefully throw exception it shows the same exception in the same page not open in the new window.Qaisar Shabbir Awan
Scorpion -- How i can show you my code, here we cannot post full code??Qaisar Shabbir Awan

1 Answers

0
votes

I think this is an internal issue that relates to how CRM treats compound entities such as opportunity product. To verify this behavior you should put breakpoint in your code and inspect the context depth and parent context to understand if the create event is indeed a child process or the opportunity. If so you might be able to re-register the plug-in the opportunity and try to somehow throw the error from there.