Tuesday, May 29, 2012

Remotely Working and Debugging SharePoint 2010 Solutions

How to remotely debug a custom webpart on sharepoint 2010? The task is not easy but if its absolutely necessary for your project then you should follow the steps analyzed in this article. If the solution provided for remote debugging is too hard then you can always install visual studio on the same machine as sharepoint, to avoid all the trouble...

Friday, May 25, 2012

Timeout expired on Dynamics CRM 4.0

Today I got a timeout expired error when calling a query to dynamic crm (from web service). I saw the query from trace and I when I executed it from sql server it elapsed 31 seconds. The problem was that the default timeout of sql queries in Microsoft Dynamics CRM 4.0 is 30 seconds.
This timeout can be overriden from registry by adding a DWORD value with the timeout time in seconds to the following registry key:

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSCRM\OLEDBTimeout]

Good reference of timeout specifications can be found here

Tuesday, May 22, 2012

Pass multivalue parameter to drillthrough report


Recently I had a request to create a drillthrough report for an aging report (actually 5 reports). I had 2 choices. One to create 5 reports or two to make one with multivalue parameters (each one of the parent reports must pass different values witch were static). Of course I decided to follow the second option. In order to do that I created the desired parameter in the parent report and I set it as multivalue and as internal.



Next I set the available values, and I set the same values and as defaults




Finally on the textbox witch I wanted to trigger the drillthrough action I inserted the parameter (OrderStatus is a multivalue parameter of the drillthrough report)




The text exression of the parent parameter was



Running Unit Tests From Network Drive

I used visual studio 2010 to create some unit tests for a custom application and I got the following error message "Error loading U:\Visual Studio 2010\Projects\LoyaltyViewer\LoyaltyViewerTest\bin\Debug\LoyaltyViewerTest.dll: Could not load file or assembly 'file:///U:\Visual Studio 2010\Projects\LoyaltyViewer\LoyaltyViewerTest\bin\Debug\LoyaltyViewerTest.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)". I googled the problem and what I found what the problem was. It appeared that visual studio could not load the assembly from a remote drive. To fix the problem, I followed the instructions from this post. The workaround is to create set COMPLUS_LoadFromRemoteSources=1.


Open a command prompt and type "setx COMPLUS_LoadFromRemoteSources 1"

or

Create an environment variable named COMPLUS_LoadFromRemoteSources
Set the value to 1