I have a code which will create a contact record in CRM 2011. For some reason it throws a Generic SQL error.
I have checked for the below:
- Length of all the fields that are being updated in Contact record
- Attributes schema name
- Lookup records
I am in need of some help please?
Use MS SQL profiler to get more information about your error :
Also have a look to : http://us.hitachi-solutions.com/blog/2011/11/29/top-five-tips-for-troubleshooting-generic-sql-error-messages-in-microsoft-dynamics-crm-2011/
Please refer the threads below.
Thanks Nithya and Abed for the information shared.
I have figured out the reason that was causing the issue.
There was another plugin which was registered on the create of Contact record that updates the email address.
So this web service and Plugin both were trying to update the email address field in database hence it causes double insert and resulted in this error.
I tried to unregister the plugin (luckily that was a test plugin) and this issue was sorted.
You should enable Tracing in CRM and check the logs for more meaningful error.
If your case is resolved, please mark the thread as verified.
Business Applications communities