CRM 2011 Autonumbering Solution

Auto numbering features are important in any business application to accomplish some business needs. Same in the CRM application and it needs additional customizations and plugin(or a custom workflow) to be implemented for the entity to statisfy auto numbering requirements. Jaimie Ji has a solution for this in CodePlex and this post is to demonstrate how to get use of Auto Numbering Solution in CRM. Advantage of the solution is that; developers dont need to write seperate plugins for each entity which needs auto numbering and it provides prefix, postfix, starting number and increment by features as well. Also it always open to change the configurations and no need any hard code values.

Unmanaged Solution (http://crm2011autonumber.codeplex.com/)

Auto Numbering Solution has a CRM solution and the solution contains one entity called “Counter” to save all the settings for all the counters. If there are two auto numbers in two different entities, just need only two records of this counter entity in the CRM application.

CRM.Plugin.SequenceGenerator is another component of the solution. If the solution doesnt contain the plugin, developers can get the source code from CodePlex, build it and can get the assembly registered in the CRM application manually.

There are some images as utilities to the Counter entity in the solution.

Source Code (http://crm2011autonumber.codeplex.com/SourceControl/list/changesets)

Source code contains the visual studio solution for the plugin. Developers can download the code, buil it and use the assembly for the registration. Plugin registration tool can be used to register the pluging in CRM application. The assembly can be attached to the CRM auto numbering solution and can be exported as a managed solution to be used in some other CRM projects.

Continue reading “CRM 2011 Autonumbering Solution”

Coding Duel for Fun with Pex

Pex for fun is a simplified version of Pex. Nothing to do with any installation for playing with this and just log in to www.pexforfun.com and play. Code editor supports C#,Visual Basic and F#, also intellisense capabilities are avalable in the editor itself.

Games are puzzles which has their own secret(hidden) implementations. Players can implement the code according to the clues given by Pex. Players can ask from Pex anytime that how close to the hidden or the expected implementation. There are random puzzles that players can picked up and allows new puzzles to be entered to the puzzles list.

These puzzle games are very interactive coding duelsa and it will improve the problem solving capabilities and recalling capabilities as well.

Pex for fun is now avalable in Windows Mobile.

 Pex In Windows Mobile
Lets see how to play and solve a puzzle.I got following puzzle and the Puzzle method getting one integer parameter and returns it. The puzzle has hiden its implementation.

Continue reading “Coding Duel for Fun with Pex”

Pex – Step in to Automated Exploratory Testing for .NET

Pex automatically generates test suites with high code coverage. Right from the Visual Studio code editor, Pex finds interesting input-output values of  methods, which can be saved as a small test suite with high code coverage. Microsoft Pex is a Visual Studio add-in for testing .NET Framework applications.Pex is coming under Microsoft Power Tools and its a result of one of Microsoft research projects. Here’s the link for Pex http://research.microsoft.com/en-us/projects/pex/

Following example will give a brief introduction on Pex and will be useful to get an idea on how it works.

Simple WPF application has ben created and it accepts two parameters(expecting two integers) from its silverlight page and displays addition of those two integers. There is a seperate Class called “Calculation” in the same namespace and it has “CalculateResult” method which adding two integers and return the result back. The program is working properly with two integers but as developers we cannot expect that the end user will always enters two integers and in this program it has not handled. In any parameterized method in a program, there can be unhandled scenarios like this(actually not  simple like this more complicated than this 🙂 )

 
 Following method will get two parameters and will try to return sum of those two.
Calculate Result Method
Lets run Pex against the CalculateResults method.
 Running Pex
Continue reading “Pex – Step in to Automated Exploratory Testing for .NET”

Debug a CRM Plug-in using the Plug-in Profiler

Debugging CRM Plugins is no longer difficult with Plug-in Profiler. Follow the steps below and try to debug a CRM plugin in your environment.

1.Build the Plug-in Registration tool according to the instructions in its Readme file. The tool can be found in the Tools\PluginRegistration folder of the SDK download.

Current version of the SDK is 5.0.10

2.Run the Plug-in Registration tool.
Run the Visual Studio solution of plugin registration tool or after build the solution, Run the “PluginRegistration.exe” under “\tools\pluginregistration\bin\Debug\” folder

3.Connect to a Microsoft Dynamics CRM server and organization. For more information on connecting to a server and organization, refer to the SDK topic: Walkthrough: Register a Plug-in Using the Plug-in Registration Tool.

4.Register a plug-in and step on the Microsoft Dynamics CRM server. Keep a copy of the debug compiled plug-in assembly on the computer where you are running the tool.
Although Released or Debug assembly has been registered with the PluginRegistration tool, here it needs Debug Compiled vesion of the assembly to be debug using plugin profiler.

5.In the tool’s main window, select Install Profiler. You will now see a Plug-in Profiler node in the list.


Continue reading “Debug a CRM Plug-in using the Plug-in Profiler”

CRM Manipulation Library

Very useful set of String manipulations, Date manipulations, Calculations, RegEx and Web functions which are not coming as CRM2011 OOB features are included in the manipulation Libray. In another words it is a set of custom workflow activities which can be used with crm workflows and dialogs as well.

Installation Manipulation Library comes as a CRM solution and as a solution of Visual Studio. There are two ways of installing it and use in CRM.

CRM Solution import

CRM solution can be imported to the CRM and after publishing it, the features will be available to use in processes. Thats the easiest way of installing it and if some one needs an unmanaged solution, they can export it as an unmanaged  solution and simply use it in any CRM environment.

Solution Import

Continue reading “CRM Manipulation Library”