May 152013
 

Last week I had to export all optionset values and labels related to entities to prepare dictionary tables for another system. T-sql approach seems to be sensible and practical since  I’m using just select query (we all know that direct SQL operation except approved are unsupported) :) , so I created very simple (might help someone) sql script is available bellow.

SELECT DISTINCT smap.attributeName, Entity.name, smap.Value
AS OptionsetStringValue , smap.AttributeValue as OptionsetIntValue FROM  StringMap AS smap
INNER JOIN       MetadataSchema.Entity
AS Entity ON Entity.ObjectTypeCode = smap.ObjectTypeCode
and Entity.name =  ‘Contact’

Result for contact entity on the screenshot .

captureoptionset

 

Share and Enjoy!
 Posted by at 10:24 pm
May 122013
 

Recently I had to to delete from my online TFS server (I’m big fan of TFS online) it took me more than expected so I decided to write quick note from field about  how to do it. Key command is TFSDeleteProject (hard to guess) , it has to be run in elevated window (Administrator), full description of all parameters is here   http://msdn.microsoft.com/en-us/library/ms181482.aspx. For online TFS  I use the following syntax.

TfsDeleteProject /collection:https://youraccount.visualstudio.com/DefaultCollection/ yourprojectname 

Assumption project seats in “DefaultCollection”. Deletion is quite drastic action so you have to have a good reason to do it and have a recent backup .

Bellow TfsDeleteProject  in action … :)

Tfsdelete

Share and Enjoy!
 Posted by at 10:57 pm
Apr 172013
 

Recently I came across requirement for calculated fields in MS CRM, it was a case when customer wanted to calculate automatically SLAs . I could develop plugin/workflow for that but I really didn’t want to reinvent a wheel (the only case when is worth to reinvent the wheel is when you need/ want to learn more about a wheel) :) , so I went to Goog. I meant almighty Bing and search for add-on which could help and I found one called N52 Formula Manager. I saw some other reviews of the product at Richard Knudson’s blog and so I thought I’d give it a try. Guess what it does what is says and even more . My key requirements were around calculating an SLA date on the case entity, including the following,

Each time a case gets created set the ‘Follow Up By’ date-time field based on the service level

  • Need to take into account a working day between 8:00 to 18:00
  • Need to allow for holidays which are defined in the Dynamics CRM business calendar
  • Need to allow for weekends

Pretty standard requirements so I started to play with that tool and it’s great, there is a lot of examples and it looks like you can code but it’s simpler N52 Formula Manager has a powerful configuration UI which is like the Plugin Registration but in a much simplified layout.

Bellow is  a “some working” version of the formula I created . The core of the formula is a case statement which looks for either Gold, Silver, Bronze or an empty service level. Plugin  would take definitely more plus think about redeploying, here you just change a formula.

 

formula

GetNextWorkingTime function takes into consideration business closure dates (Settings -> Business Management -> Business Closures) so my requirement was met without any change , and you  know what’s even more interesting 10 formulas are free :)   I was impressed by that good tool so I decided to blog about it.

Links

p.s

During that Bing(Go) search I also found two very useful add-on catalogs worth too look at them .

 

Share and Enjoy!
 Posted by at 6:49 pm
Apr 102013
 

Microsoft few months ago release whitepaper called “Deploying Microsoft Dynamics CRM 2011 and CRM Online Solutions from Development through Test and Production Environments” which explores deploying real-world Microsoft Dynamics CRM solutions across test and production environments in reliable ways by using automation and I’m sure we all agree that software testing is very important and there are many different types of software testing, such as unit testing, integration testing, acceptance testing etc. but in this post I’d like to point on particular aspect of testing in MS Dynamics World, automated testing with real data and I’m not going to create yet another article full of theory. The goals is show part of automated process of populating data in newly created organization i.e. to developer’s VM , this is of course not the only way how this can be done but it proven to me be very effective. Let’s start

Ingredients:

  • SQL server with SSIS (2008 , 2012)
  • SSIS Integration Toolkit for Microsoft Dynamics CRM (from Kingswaysoft)  or any other CRM adapter for SSIS
  • Source Data either generated for particular scenarios or prepared manually.
  • Bit of SSIS knowledge

 

HowTo:

We will build SSIS package which will accepts parameters from command line and can be executed by our build script.

Example:

Full example is a subject for a next article but few pointers for now.

Why I decided to use SSIS , well it’s proven technology to “move” data , very flexible and based on solid framework and in my simple world it works but as I mention earlier this is just example, what is really important is that we should have well described deployment solutions strategies.

Share and Enjoy!
 Posted by at 10:57 pm