Replace Dynamics CRM default error message with custom message

apollo7
apollo7 used Ask the Experts™
on
We are working with Dynamics 365 CRM (on-premise) and using a custom front-end developed with ADX.  

My issue is that ADX allows a CRM quote or order to be shared with the same user more than once.  When this is done, we receive an error message: "Cannot insert duplicate key."  (It is my understanding that this is the default Dynamics error).

What I want to do is replace this with a more user-friendly message like: "This order has been already shared with that sales person".

I am looking for the best approach to transform the default error message to the user-friendly message.

Thank you
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Chief Technology Ninja
Distinguished Expert 2018
Commented:
Hi apollo7,


This is actually a .net error message. I suggest you check the code of custom ADX portal first. If it is not causing the problem then we can have a pre-plugin that will check whenever a CRM quote or order is being shared with the same user and then throw appropriate error message.

Ideally, this check should happen in your front end even before the request is sent to CRM.

Regards,
Chinmay.

Author

Commented:
Chimay, thanks for the comment, I had our ADX consultant check the front end and that was the problem.  I dont have access to ADX so I have to rely on other consultants but the problem is solved.
Chinmay PatelChief Technology Ninja
Distinguished Expert 2018

Commented:
Hi apollo7,

I am happy it worked out just in time for the holidays. Happy holidays. :)

Regards,
Chinmay.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial