Wednesday, October 06, 2010

CRM 2011 Beta SDK Sept/Oct Refresh

I'm not sure how I missed this, but there was a new update to the 2011 SDK a few days back.

Most notably they've added hands-on-labs and tons sample code. Sweet!

Go get the latest version here.

Disable Aero Peek

Am I the only one that get easily annoyed by the Aero Peek feature in Windows 7? It gets pretty bad when you're working with multiple monitors and accidentally hover over a taskbar window icon. Its almost like a miniature light show. :/

Here's how to disable all that craziness:

http://www.howtogeek.com/howto/5473/make-aero-peek-display-instantly-or-disable-it-in-windows-7/

</rant>

Monday, August 30, 2010

Debugging Tips with Visual Studio 2010

Some useful debugging techniques for Visual Studio:

http://weblogs.asp.net/scottgu/archive/2010/08/18/debugging-tips-with-visual-studio-2010.aspx

Webservice Testing Tool - WcfTestClient

Windows Communication Foundation (WCF) Test Client (WcfTestClient.exe) is a GUI tool that enables users to input test parameters, submit that input to the service, and view the response that the service sends back. It provides a seamless service testing experience when combined with WCF Service Host.
I didn't know this tool existed until a few weeks ago. Apparently its a part of Visual Studio. I've started digging deep into WCF the last few days and its been an indispensable tool to say the least.

More Info on the tool here:
http://msdn.microsoft.com/en-us/library/bb552364.aspx

Also on a side note, I used to be a big fan of storm and they seem to have a paid version here which adds support to WCF. I don't know how it compares to WcfTestClient though.

Friday, August 27, 2010

Could not establish trust relationship for the SSL/TLS secure channel with authority

I've working on interfacing with a 3rd party web service recently. The development version of the service had an SSL certificate that was issued to different host than the one deployed on. This, as expected, was throwing out "Could not establish trust relationship for the SSL/TLS secure channel with authority" exceptions at run time.

I did some research on how to overcome certificate issues and this link covers most of the techniques available.

More instructions on creating a temporary certificate for development:
Create and Install Temporary Certificates

Please understand there's a reason why the webservice call fails. These techniques should only be used for testing in a dev environment against a trusted service.

Thursday, August 26, 2010

Styles of Programming

I came accross this link while cleaning up my bookmarks:

http://www.codeinstructions.com/2008/10/styles-of-programming.html

I think I fall somewhere between a Surgical and Butcher Programmer.

Friday, August 13, 2010

CRM 2011 New Features And The Wait or Build Decision

Some interesting thoughts on whats new in CRM 2011 and how it affects applications we build today.
http://www.dynamicscrmtrickbag.com/2010/08/06/crm2011-waitorbuild/
http://www.dynamicscrmtrickbag.com/2010/07/25/taking-the-covers-off-crm-2011/

In my opinion, if time permits, I would always try opt for the wait; at least until the beta releases of the product come out.
From my past experiences early adoption has worked out pretty good for us. It gives us the opportunity to offer the customer so much more value in their solution.

The development cycle may not be the smoothest, but at the end of the day the rewards are worth it.

Thursday, August 12, 2010

URL Addressable Forms and Views

The list of addressable Forms and Views in CRM. This came pretty handy recently when setting up a customized navigation for a client.

http://msdn.microsoft.com/en-us/library/cc150850.aspx

Tuesday, August 10, 2010

CRM 4.0 Sitemap Group with id has an empty title Warning

I've been doing some extensive changes to the SiteMap.xml recently. Everything went well and the site loads except that CRM started throwing warnings in the trace log everytime I visited the site.

...
at CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
at ApplicationStepManager.ResumeSteps(Exception error)
at HttpApplication.System.Web.IHttpAsyncHandler.BeginProcessRequest(HttpContext context, AsyncCallback cb, Object extraData)
at HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr)
at HttpRuntime.ProcessRequestNoDemand(HttpWorkerRequest wr)
at ISAPIRuntime.ProcessRequest(IntPtr ecb, Int32 iWRType)
>Sitemap Group with id "grp_Programs" has an empty title (groups have to have titles if their parent area has ShowGroups attribute set to true).
# CRM Tracing Version 2.0
# LocalTime: 2010-08-10 09:21:40.8
# Categories:
# CallStackOn: Yes
...
I did validate the sitemap against the schema while editing the xml, so I'm sure that its well formed and valid. Also, the import process did not complain during the upload either.
(more info on the schema I used at the end of the post)

A little investigating and trial and error I found that the problem lay with the deprecated "Title" attribute in the Group node. (http://msdn.microsoft.com/en-us/library/cc150880.aspx)

Even though the documentation states that attribute is deprecated, it appears that CRM uses it internally. So adding this attribute produces the following site map:
<group id="grp_Programs" title="Programs">
<titles>
<title lcid="1033" title="Programs">
<title lcid="1036" title="[Fr]Programs[/Fr]">
</titles>
...
</group>

I tested this with Rollup update 10 and I'm not sure if that has been fixed with a newer rollup. I might try this again with the latest rollup to see if its still reproducible.

References:
The schema I used to validate contains the customizations.xsd, the SiteMapType.xsd and the Isv.config.xsd files into one file. Download it here:

http://rc.crm.dynamics.com/rc/regcont/en_us/op/articles/sitemap.aspx
http://rc.crm.dynamics.com/rc/downloads/ISVConfigAndSiteMap.zip

Wednesday, August 04, 2010

CRM Update Rollup 12

The CRM team releases a new Update Rollup:
Build number and file names for this update rollup
The build number of the update rollup packages for the Microsoft Dynamics CRM 4.0 server, for the Microsoft Dynamics CRM 4.0 client for Microsoft Office Outlook, and for the Microsoft Dynamics CRM 4.0 E-mail Router is 4.0.7333.2935.
You can download it here. And find the Associated KB article here.

Sunday, August 01, 2010

Assigning Roles to a deactivated Users in CRM

This cannot be done. I found out the hard way when trying to write a user syncing service. It makes sense if you really think about it; why would you want to assign a role to a deactivated user anyway?

If you still want to do this the work around is to temporarily activate the user, assign the roles and deactivate him again.

Hope this helps someone out there.

Sunday, July 11, 2010

Sorting Dynamics CRM Left Navigation

In CRM 4, when you enable a custom entity to be displayed in a navigation area, they are displayed in the order they were added. We had a requirement to sort the entities so that they can be found easily. The way to achieve this is to edit the SiteMap.xml and re-upload back into the site. This can be very tedious if you have a considerable amount of custom entities.

I wrote an XSLT file which automates the sorting process. Hey, if you gotta do something more than two times, might as well automate it.

A few things to note when using this approach:
  • The sort can only be performed against the internal names of the entities as the SiteMap.xml does not contain the display names.
  • As new entities are added to areas, this script will have to be re-run.
  • This solution does not sort the left navigation within the Forms.


Please let me know your thoughts in the comments.

Sources

Configure the Site Map to Customize Application Navigation in Microsoft Dynamics CRM 4.0
http://msdn.microsoft.com/en-us/library/dd393294.aspx

SiteMap XML Reference
http://msdn.microsoft.com/en-us/library/cc150883.aspx

Friday, July 09, 2010

Clear SQL Server Cache and Stored Procedure Cache

To clear SQL Server’s cache, run DBCC DROPCLEANBUFFERS, which clears all data from the cache. Then run DBCC FREEPROCCACHE, which clears the stored procedure cache.

I never seem to have this info handy when I actually need to use it. Posting here for easy reference.

Source:
http://www.devx.com/tips/Tip/14401

Monday, June 14, 2010

Visually Differentiate Your CRM Environments

Found this nice tip a few weeks back, been using it ever since. I think its a great idea and one that can be adopted to other framework solutions as well.

http://feedproxy.google.com/~r/typepad/sonoma/~3/z7jsCUcqn_0/visually-differentiate-your-crm-environments.html

Virtual Box Inverted Mouse Scroll

I've experienced this annoying bug in virtual box a few times now. VB randomly (?) decides to invert your mouse scroll direction. Its not really a big deal, just that it zaps your concentration. Hitting the LCtrl, LShift, LAlt, Win, RCtrl, RShift, RAlt in an random order seems to fix it. That seems to be the best solution out there at the moment.

Source:
http://forums.virtualbox.org/viewtopic.php?f=6&t=29957

Sunday, June 06, 2010

Update Rollup 11 Released

http://blogs.msdn.com/b/crm/archive/2010/06/04/update-rollup-11-for-microsoft-dynamics-crm-4-0.aspx
Update Rollup 11 is cumulative. However, the Update Rollup 11 CRM Client and Data Migration Client packages require Update Rollup 7 to be installed. For all other CRM components you do not need to install any previous Update Rollups prior to Update Rollup 11

Get it here:
http://support.microsoft.com/kb/981328

Monday, May 24, 2010

Wednesday, May 12, 2010

CRM 4.0 Customizations Comparison Tool

The Customization Comparison Tool


"...tools that help you analyze the impact of customizations on the system and maintain consistent configuration data across multiple Microsoft Dynamics CRM systems."


The Data Migration Tool


...lets you export custom configuration data from a source Microsoft Dynamics CRM system and import it to a target Microsoft Dynamics CRM system.


http://blogs.msdn.com/crm/archive/2010/01/14/isv-utilities-for-comparing-customizations-and-transferring-configuration-data.aspx

Another tool to go into my tool belt.

Wednesday, May 05, 2010

Best Practices on Building Sharepoint 2010 Web Parts

http://channel9.msdn.com/posts/funkyonex/Best-Practices-on-Building-SharePoint-2010-Web-Parts-with-Visual-Studio-2010/
....

Death Metal Rooster!

Oh man!

http://www.thechickentest.com/2010/05/how-could-i-not-repost-this-death-metal-rooster/

CRM 4.0 Plug-in Filtering Attributes Limitation

I ran across this error while setting up the Filtering Attributes for a custom plug-in today :
Error Code: 0x80044331
A validation error occurred. The length of the 'filteringattributes' attribute of the 'sdkmessageprocessingstep' entity exceeded the maximum allowed length of '100'.
The the Filtering Attributes property basically tells the plug-in which specific field changes it should respond to.

Investigating the issue it looks like its a limitation in the CRM web service. The web service limits the length of the field to 100 characters. Its strange that its not even the number of attributes that is the limitation but rather the concatenated length all the attribute names!

Interestingly enough the creation of Image Attributes support a total of 4615 characters: http://technet.microsoft.com/en-us/library/dd904023.aspx

Hopefully with CRM 5.0 around the corner this will all be addressed.

Sunday, May 02, 2010

CRM 4.0 Plug-in Development Best Practices

I found this excellent post on best practices for CRM Plug-In development. Its a must read for anyone considering plug-in development.

http://blogs.inetium.com/blogs/azimmer/archive/2010/01/25/plugin-best-practices-in-crm-4-0.aspx

Monday, April 19, 2010

CRM 4.0 Customized Webservice For A Specific Organization

I recently been working on customizing CRM plug-in deployment tool to add some additional functionality. The source for the tool is available with the CRM 4.0 SDK.

To successfully build the source we need to add a web reference back to the CRM web service. The problem I ran into was that the default url (http://<server:port>/mscrmservices/2007/CrmServiceWsdl.aspx) returns a wsdl scheme with all its customizations. If you just need a clean proxy like I did then you need to create a new organization and then provide its name in the uniquename query string variable:

http://<server:port>/MSCrmServices/2007/CrmServiceWsdl.aspx?uniquename=OrganizationName

Thursday, February 18, 2010

List of SharePoint 2010 OOB Features

Here's a (exhaustive?) list of all the OOB Features and their respective guids available in SharePoint 2010. Found via this post.

http://blogs.msdn.com/mcsnoiwb/archive/2010/01/07/features-and-their-guid-s-in-sp2010.aspx


This list might come in handy in the future.

Sunday, January 31, 2010

SharePoint 2010 Beta 2 SQL Server Version

I ran into some trouble getting SQL Server installed on the same box as SharePoint. It think it may have something to do with the order of installing applications. As a general rule of thumb make sure that you install from the oldest to the newest apps. This is especially true when working with beta software.

Running the configuration wizard I discover that  SharePoint 2010 requires the latest SQL Server updates be installed.

SharePoint2010_Wizard_SQL

SQL Server 2005:

SQL Server 2008:

Posting it here hoping it will save someone else some trouble.

Friday, January 29, 2010

SharePoint Workflow Versioning

Upgrading Workflows in an existing SharePoint site can be very tricky. Just copying in a new version is not the best practice. Depending on what changes were done to the new version of the assembly SharePoint may end up having trouble re-hydrating (deserializing) the currently in-progress workflows.

Here are some excellent articles I found recently on how to properly implement versioning, its potential pitfalls and how to overcome them:

Another alternative approach which I think is also a good solution:

Adding a new item to a SharePoint List

Using SPList.Items.Add() is not the best way to add a new item to a list. This is because the moment you access the get method on the Items collection it retrieves all the items into memory.

A quick peek at the Microsoft.SharePoint.dll assembly via reflector confirmed it:

sharepoint.SPList 

You may not notice a difference in performance in the dev environment, but once your list starts to grow it will gradually degrade.

I recently learned this the hard way. This is the best way to add a new Item:

SPList list = _Web.Lists[LIST];                    SPQuery query = new SPQuery();
query.RowLimit = 0;
SPListItem item = list.GetItems(query).Add();
item[TITLE] = “testing”;
item.Update();

On an unrelated note, executing a query with a RowLimit generates an underlying SQL query such as  SELECT TOP X ..... where X is the RowLimit value.

I wonder if the behavior is still the same in SharePoint 2010. Hmmm...

References:

More best practices on SharePoint: