Wednesday, 24 June 2015

Quick Tip Generic SQL Error CRM Plugin C#

A quick tip here, just for sharing what happened.

Once you get this Generic SQL Error, beside you can check the event viewer, DB Log, or SQL Tracing or even your Plugin Tracing, I want to share that there are two conditions triggering this error that is actually simple but not anticipated before.

There are:

1. I tried to set a field text that is actually max length = 100, but I give more than 100.
This is commonly happening once you try to set a name as primary field that it is good to not leave it blank, so you use combination of the important fields since CRM cannot use any other than text field to be primary key.

2. Try to create child record or associated record before parent record is created.
This was happening that time I forgot to set the Plugin to Post-event creation instead of Pre-event one.

Hope this can help you, I waste time to see what happened, while I was trying to debug, in fact those two simple cases causing the trouble.

You have any other simple one causing the trouble? Let us know!

Thank you.

2 comments:

  1. Given so much information in it. its very useful .perfect explanation about Dot net framework.Thanks for your valuable information. dot net training in chennai velachery | dot net training institute in velachery

    ReplyDelete
  2. It is really a great work and the way in which u r sharing the knowledge is excellent.
    Thanks for helping me to understand basic concepts. As a beginner in Dot Net programming your post help me a lot.Thanks for your informative article.. dot net training and placement in chennai | best dot net training in chennai

    ReplyDelete

My Name is..