Connections VS Relationships in CRM

Relationships are one the strengths in CRM and it was there from its beginning and Connections introduced with CRM 2011. Recently I had to decide whether the use CRM connections or relationships to implement a feature in CRM and I found pros and cons of using each as solutions. Also I have given my ideas according to my experience with them.

My personal preference is goes to Relationships as it is steady and it clearly expresses the association type among entities. Relationships can be directly seen from each entity with its type even in the forms and it can be easily used in reports and in views. Mostly the relationships are decided at the time of designing the CRM solution and the code (e.g. proxy class) has to be generated to use it in plugins and custom workflows when you are using early bind method. Also if any entity is related to many other entities for different functionalities, there is a possibility of having empty values in CRM records\forms. in that case developers has some more work to hide them or handle blanks in each lookup.

With connections the user can use the association between two records only when needed. But there should be an additional step to be taken, that is relationship role. Also when any connection is retrieved developer has to get the relationship role first. Connections are very useful when the relationship between two entities are rarely used and specially when a scenario having a many to many associations as in a network.

I found a good thread on this initiated by Dinesh and click here to open it;

Advertisements

CRM 2011 Workflows being Duplicated

Imagine that only one workflow has been in CRM and only one workflow will be shown under all processes view. From advance find, it will show one workflow when queried. There’s a difference between advanced find query for the processes compared to the other usual entities, when processes has been selected under “Look For” dropdown it gives a default filter conditions as follows.

WFAdvancedFind

After activating the workflow just created, in the advanced find, it will show only one workflow with the default filter criteria given. But after removing all filters from the advanced find it will show two workflows. Whenever a workflow gets activated CRM will automatically create a snapshot of the same workflow.

In the schema for the Type attribute, there are three values;

1 = Definition
Definition of a Workflow that is displayed in the application in the “All Processes” view. When you make changes to a workflow, you are making a change to a Workflow definition (or template); if you delete a workflow, you are deleting a workflow definition (or template)

Continue reading “CRM 2011 Workflows being Duplicated”

Data Migration to Dynamics CRM using SSIS – SS SLUG

Data migration is a vital part of a software project if it moving from one system to another. It is further important if the new system is a Microsoft Dynamics product like Microsoft Dynamics CRM.
I was able to disscuss and to have a session at Sql Server Sri Lanka User Group October meeting. Anyone can join following web site, download slides and sample codes and materials.

Download Slides and Codes:
http://www.sqlserveruniverse.com

Photos of the session from following link:
http://www.sqlserveruniverse.com/SSSLUG/Gallery/October2012.aspx

Layered Multi Select Checkboxes – Custom Controls in CRM – Part 2

Layered multi level checkboxes challenge can be acheived by using CRM Optionset control and javascripts too. However there is a technique to be used to identify parent and child levels of the multi layered checkboxes. Each picklist item’s value can be used to decide the layer of the checkbox.

Control looks like this in the CRM form after implementing it.

Follow the steps below to work with Layered Multi Select Checkbox control.
Continue reading “Layered Multi Select Checkboxes – Custom Controls in CRM – Part 2”

Multi Select Checkboxes – Custom Controls in CRM – Part 1

Multi select check boxes control is a very essential control in web forms. Some times client needs exactly the same feature in CRM forms as well. When the requirement is to develop a dynamic multi select checkboxes control its really difficult for the developer to implement the feature in CRM. CRM developers will have a little relief with this solution even if there are Javascripts needed to activate the functionalities.

An Option Set control and a Multi line textbox are used to create the Multi Select Checkboxes control. Labels of the checkboxes can be stored in the optionset control as items. Selected values will be saved in the multi line textbox seperated by semi colons.

Control looks like this in the CRM form after implementing it.

Multi select checkbox control in the form

Follow the steps below to work with Multi Select Checkbox control.

Continue reading “Multi Select Checkboxes – Custom Controls in CRM – Part 1”

Disable Required Fileds When Hide Tabs in CRM 2011

There are requirements to hide tabs according to the selections in the form and if any tab contains required fields it will display them automatically and asking user to fill those fields when saving the form.

Following Javascript function will disalbe all the controls in the tab and then it will not ask user to fill those required fields.

// tabName : Name of the Tab, isDisable: booloean value for Enable/Disable controls
DisableAllControlsInTab: function (tabName, isDisable) {
    var tabControl = Xrm.Page.ui.tabs.get(tabName);
    if (tabControl != null) {
        Xrm.Page.ui.controls.forEach(
        function (control, index) {
            if (control.getParent().getParent() == tabControl && control.getControlType() != "subgrid") {
                control.setDisabled(isDisable);
            }
        });
    }
}

Following Javascript function can be used to show or hide the tab and it will disable/enable its controls accordingly.
Continue reading “Disable Required Fileds When Hide Tabs in CRM 2011”

Intellisense for Xrm.Page in CRM 2011

In CRM 2011 javascripts for crm forms can be stored externally as web resources and those are no longer embedded in CRM forms. Javascripts in web resources can be edited using an external editor. Visual Studio IDE provides intellisense to the Javascripts in Xrm.Page with the help of XrmPage-vsdoc.js. It works with Visual Studio 2010 and Visual Studio 2012. Thanks to Patrick Verbeeten for bringing this cool feature in.

In order to get the intellisense Visual Studio IDE needs the reference of the XrmPage-vsdoc.js file. Follow the following steps to enable intellisense for Xrm.Page in the Javascript.

[1] Download XrmPage-vsdoc.js from HERE

[2] Add XrmPage-vsdoc.js in to the Visual Studio IDE

Continue reading “Intellisense for Xrm.Page in CRM 2011”

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”

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”