Friday, September 28, 2012

Many of the CRM MVP's banded together and compiled their knowledge to release a stellar book that covers most aspects of CRM. This book, with it's many knowledgeable authors, can be considered the true experts guide when it comes to Microsoft Dynamics CRM 2011.

Tuesday, September 18, 2012

This illustration shows how to programmatically determine if an entity is eligible to participate in a relationship typ in Microsoft Dynamics CRM 2011 in code using VB.NET.

There are three different SDK web service messages highlighted in this post. They are:

GetValidManyToManyRequest: Get list of entities that can participate in many to many relationships

GetValidReferencedEntitiesRequest: Get list of entities that can particaipate in one to many relationships as the "many" entity

GetValidReferencingEntitiesRequest: Get list of entities that can particaipate in one to many relationships as the "one" entity

Ok, here is what the code looks like!

Here's the VB.NET Code:

Dim req As New GetValidManyToManyRequest()
Dim resp As GetValidManyToManyResponse = DirectCast(slos.Execute(req), GetValidManyToManyResponse)
'Get list of entities that can particaipate in one to many relationships as the "many" entity
Dim req2 As New GetValidReferencedEntitiesRequest()
Dim resp2 As GetValidReferencedEntitiesResponse = DirectCast(slos.Execute(req2), GetValidReferencedEntitiesResponse)
'Get list of entities that can particaipate in one to many relationships as the "one" entity
Dim req3 As New GetValidReferencingEntitiesRequest()
Dim resp3 As GetValidReferencingEntitiesResponse = DirectCast(slos.Execute(req3), GetValidReferencingEntitiesResponse)
'now you can get the entitie names this way for each response by examining the response.entitynames property

Tuesday, September 11, 2012

I have run into several situations where people want a very quick delete functionality or they have an application that needs to hit the webservice many times in very quick succession. This usually means multi-threading your application and that can cause problems if you hit it too many times too quickly and you can get errors because the available ports get used up and are not recycled fast enough. I have overcame this to some degree in .NET by using stacks and when an atomic operation fails it just get's put back on the stack for another thread to pick up and try again.

It seems that there is another way to crank up the horsepower and increase throughput by changing a couple registry settings. One to increase the number of ports available and another to decrease the amount of time they take to recycle.