Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CRM 2016: error message dialog does not show up

In Offer screen, I have an subgrid of ProductOffer can be added. I have a PreCreate ProductOffer plugin which checks for some conditions to show error message and stop creating.

So in this plugin I added:

throw new InvalidPluginExecutionException("My message");

But no dialog message is shown up but an error notification on top of the subgrid with message: "ISV code aborted the operation".

Please tell me why is my message not displayed? And how to solve this?

Thank you verymuch.

like image 556
Hong Nguyen Avatar asked Apr 15 '16 04:04

Hong Nguyen


1 Answers

What you're describing is the normal expected behavior in CRM based on my experience with it. I've done the same thing with the line item sub-grid on the Quote form. I have a plugin that applies some business logic on create of a QuoteDetail record and prevents the user from doing certain things. When the plugin throws an exception the only thing displayed is the error message above the grid as you described. My guess is that the sub-grid is somewhat isolated from the main form controls and you don't get the normal full business process error pop-up because it was an exception on a related entity and not on the main entity you're viewing in the form. I have not found any way around this and I believe it would need to be a product feature request on connect.microsoft.com for MS to consider changing.

like image 198
AK3800 Avatar answered Oct 26 '22 06:10

AK3800