CRM 2011 Add a MsgBox  to replace an Error Message

Posted on 2016-07-14
Last Modified: 2016-07-29
I have an error message that pops up when a user tries to add more characters to a description field than the limit allows.  The error is:

If I click Download Log File and read the error, it states:

Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: Generic SQL error.Detail: 
<OrganizationServiceFault xmlns:i="" xmlns="">
  <ErrorDetails xmlns:d2p1="" />
  <Message>Generic SQL error.</Message>
  <InnerFault i:nil="true" />

[b] <TraceText>
[Nextgen.Crm.Plugin: Nextgen.Crm.Plugin.ProcessProjectionFromLineItem]
[4ecac274-ebad-e311-8c19-463500000031: Nextgen.Plugin.ProcessProjectionFromLineItem: Update of opportunityproduct]

Open in new window

How do I read the error specifically  [Nextgen.Plugin.ProcessProjectionFromLineItem: Update of opportunityproduct] and return a MsgBox that states: The description field is limited to 2000 characters

Also I would like to provide the user with an OK button on the MsgBox that puts them back in the Description field

Question by:apollo7
  • 3
LVL 19

Accepted Solution

Rikin Shah earned 500 total points
ID: 41717102

I would suggest you write a JS function which fires on OnChange event. Checks the length of the field and if the length is more than 2000 characters, trim it to 2000 characters.

References: (change the parameters to 0 and 1999)

Author Comment

ID: 41721157
Thanks, I will give this a try.

Author Comment

ID: 41735203
This works, thanks.

Author Closing Comment

ID: 41735204
This worked, thanks for the help.

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
jquery easyautocomplete for mutiple text boxes 9 54
Message not shown 5 30
Javascript to allow login/password authorization 4 29
Change javascript css 1 19
I have been working with Orchestrator 2012 for a few months now and I must say it has surprised me at every turn, with its functionality and integration capabilities it has really shown me how the System Center Suite of products really all fit toget…
Hi Everyone I posted previously on how I used Orchestrator to integrate with VMware and SCSM to create or request a new VM in VMware. Now in my Self Service Portal I had a list user input option that would require me to update the list of reso…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now