Monday, November 29, 2010

ExecuteNonQuery requires the command to have a transaction when the connection assigned to the command is in a pending local transaction. The Transaction property of the command has not been initialized.

Hi..

Recently I came across one wierd Error found by one of my QA friend after we imported a new CRM 4.0 organization into our development environment. The error stated something like below (Error can be tracked in the trace log files. Check out this link to find out how to enable Tracing in CRM 4.0)

"System.InvalidOperationException: ExecuteNonQuery requires the command to have a transaction when the connection assigned to the command is in a pending local transaction. The Transaction property of the command has not been initialized."


We were facing this error on all the ISV aspx pages embedded into CRM and that too was user specific i.e. for some users these ISV pages worked fine but others were facing the above error.

After loads of digging and googling around the web, i came across this link which provided the solution but this was not the case for our error.

Solution : 
       The Solution was really very simple after we found it... The issue which we were facing was due to missing Default Organization for some of the users. We just updated the Default Organization for those users and the system go up and running.

Database: MSCRM_CONFIG
Table : Organization
Query : Select Id, UniqueName From Organization
              Get the Id from the above query result (In case of Multi-Tenancy, take the id of the organization which you want as default for the particular user)


Database: MSCRM_CONFIG
Table : SystemUser
Query : Update SystemUser
              Set DefaultOrganizaionId = <>
              Where Id = <>

Updating the DefaultOrganizationIds for the users will fix the above error and you are good to go to your boss and boast of your achievement !!! J

Hope you find this solution useful. Feel free to post the query in case you need help for Dynamics CRM and this post. J

Tuesday, October 12, 2010

Error message when you export or delete entities in Microsoft Dynamics CRM 4.0:
"An unhandled exception occurred during the execution of the current web request"


Hi,


Recently one of my friend faced a weird type of error while exporting the customization. Error was something like

"An unhandled exception occurred during the execution of the current web request"

After searching for the error on the web... I encountered the link of Microsoft Knowledge Base article for the issue and solution to it. 
Find the URL for the same: http://support.microsoft.com/kb/947096

The common root cause for this issue is:
  • An entity form has an attribute that does not exist.
  • A primary entity of a relationship was missing during the previous import and because of which the relationship lookup attribute on the secondary entity form became orphan.
Solution:
1.    Firstly you need to find out the entity for which the error is arising. (In case you are using Export All Customizations). 
After finding the Entity you need to find out the culprit attribute on that entity form which is orphan. To find out the same follow appropriate method as given in the Microsoft KB link which I provided above or for your faster reference find the same below:
 Note The error message in the platform trace file does not display the exact attribute that causes the problem.
2.    Open the Form editor, and then find the attribute that causes the problem. To do this, use one of the following methods:
    • Look for an attribute that is missing a label.
    • Look for an attribute the properties of which have only the Name value and do not have the Display Name value or the Description value.
    • Create a new record for the entity that you found, and then find the attribute that causes the problem.
3.    Create a temporary attribute that uses the same name as the attribute in the entity form.
4.    If the attribute is not required for the deployment, follow these steps:
a.    Delete the attribute from the entity form.
b.    Publish the entity.
c.    Delete the temporary attribute.

Please feel free to post any queries/comments you have...


Thanks. J


Tuesday, September 28, 2010

CRM Migration Error :
Microsoft.Crm.CrmException: Found no feature for Organization with Id

Hello Everyone,

Today while migrating CRM 4.0 to CRM 2011. I found very interesting issue. The Error which got caught in the Log was something like
Microsoft.Crm.CrmException: Found no feature for Organization with Id
After searching intensely, I found the root cause for the above error faced during Migration.

Note: This error will come only if your Migration has been failed once before due to some other reason.

Solution:
     The root cause for this error is the records for the failed Organization which gets inserted in the below tables of MSCRM_CONFIG database.

  • OrganizationProperties
  • SystemUserOrganizations
  • OrganizationFeatureMap
  • Organization

Delete all the records having references for the Failed Organization from these tables and then again start your migration process.

Yipeee.... After this you will get rid of the above error.... J

Feel free to post your queries/comments if any regarding the CRM Migration.

Thanks... J

Cool New Features in CRM 2011

Hello Everybody,

Now as CRM 2011 Beta is released, It comes with a great pack of new and exiting features some of which i would like to share with you all....

  • The new Ribbon look Menu bar (Just like Microsoft Office 2007)
  • Filters on the Grid Columns (Just like Microsoft Excel)
  • Use of Customized Views for Lookups.
  • Drag & Drop feature in Form Customization.
  • The great new Personalized Dashboards with charts. (Some are also built-in)
  • No more tabs, Single Page Form.
  • Built-in Field Level Audit Functionality
  • Plug-ins can also be executed inside the CRM Platform Transaction. (In 4.0 Only Pre-Event and Post-Event Plug-ins were supported)

There are loads of other exiting features available... Try exploring them and you will be delighted to the great extent....

Enjoy CRM 2011 J

Monday, September 27, 2010

CRM 2011 Beta has been Launched !!!

Hey Folks,

A Great news for all the Microsoft Dynamics CRM 4.0 lovers.... J

Much awaited CRM 2011 Beta has been released by Microsoft CRM Product Team on 9th September 2010.

You can download the CRM 2011 Beta and get more information on the same using below link:
http://offers.crmchoice.com/CRM2011Beta-Landing

Direct link for downloading CRM 2011 is as below:
http://www.microsoft.com/downloads/details.aspx?FamilyID=0c7dcc45-9d41-4e2e-8126-895517b4274c

Soon I'll be posting the cool features being provided by CRM 2011...

Till then enjoy our new CRM 2011 !!!! J

Thursday, August 19, 2010

Web service request GetDataSources to Report Server failed. Error: Unable to connect to the remote server

Hello Everybody...

Here I am sharing my experience during the investigations of a very serious but easy to fix issue :-) which our team faced with CRM Reports. Hope you find it useful...

Recently our CRM team faced a serious issues when suddenly all the CRM Reports got break down and were unable to load.

The errors which got logged in the event viewer of the CRM Server were something like below:

"Web service request GetDataSources to Report Server http://report server name/reportserver failed. Error: Unable to connect to the remote server"


AND


"Web service request GetDataSources to Report Server http://report server name/reportserver failed with SoapException. Error: The path of the item '/CRM Database Name/4.0/' is not valid. The full path must be less than 260 characters long; other restrictions apply. If the report server is in native mode, the path must start with slash. (rsInvalidItemPath)"


After some hours of investigations in every nook and corner of CRM for finding the root cause of this issue. One of my team member caught the source of the issue. Issue was due to the settings on the Reporting Server which somehow got changed. Catch the below screen shot for details.

Solution:
Make sure that the settings on the report server are as per the below screenshot. The URL to access your Reporting server will be like http://Report Server Name/Reports. After you go to this URL, get yourself reach to the below page and check your settings.



Wasn't it really an easy fix...? J

Wednesday, August 18, 2010

Not have enough privilege to complete Create operation for an Sdk entity Platform

Hello,

Seldom you may encounter the following error during an attempt to register a workflow activity or plug-in into MSCRM 4.0.

"Not have enough privilege to complete Create operation for an Sdk entity Platform"


You may think that the user whose credentials are used to register the workflow or plug-in have the rights of "System Customizer" and if more over also have the rights of "System Administrator" then why this type of error is thrown.

The mystery behind this error is like,  for any operations on Sdk entity platform, the user should have the rights higher than that of "System Administrator" which is the rights of "Deployment Administrator".


Solution :
You can give the user the rights of "Deployment Administrator" from the Deployment Manager program on the CRM Application Server under Start -> Programs -> Microsoft Dynamics CRM -> Deployment Manager.


In Deployment Manager, Click on "Deployment Administrators" folder on the left pane. Thereafter click on "New Deployment Administrator" link on the right pane of the window and add the user in it.


Also note that only the user having the rights of "Deployment Administrator" can open Deployment Manager and can add any other user to the list of Deployment Administrator in Deployment Manager.


Hope you find this helpful... J

Tuesday, July 6, 2010

Exception: Too many parameters were provided in this RPC request. The maximum is 2100.

Hello Folks, 


Recently I had encountered a very interesting issue when i was working with CRM Web Service and trying to fetch the data requested by user using the Advanced Find window.

The Exception which i was faced was something weird like this :

Exception: System.Data.SqlClient.SqlException: The incoming tabular data stream (TDS) remote procedure call (RPC) protocol stream is incorrect. Too many parameters were provided in this RPC request. The maximum is 2100.

After bugging into the issue for some hours together, I found very interesting fact regarding the SQL Server. So I wanted to share this with you all.

In SQL Server, You can only have up to 2100 parameters inside IN statement in WHERE Clause.
You will get the above exception if the query similar to below is fired in SQL Server.

SELECT * FROM tablename WHERE columnname IN (1,2,3,4,5, ........ , 2101 )

Solution:
You can create new table with the values in IN statement and then JOIN your table with it. Find below example.

--Create new table
Create Table temp (myvalues uniqueidentifier)

Add all the value in IN statement of above query to the temp table above and then use this table with join to your above query as below.

-- Join new table with your table
SELECT t1.*
FROM tablename t1
JOIN temp t2 ON t1.myvalues = t2.myvalues

Hope you find this post useful. J