I was adding some “fancy” to a Contact form today that I thought I would share with you:


The Concept

On the Contact form, I have added the two sets of addresses that are built into Contact and am calling them Primary Address and Secondary Address.  I thought it would enhance the user experience to change the label when a user specifies the actual type of address.

The result is something like this:



The Implementation

Follow these steps to implement this solution:

Step 1

1. Create two sections on the form to hold the fields, one for Address1 fields, the second for Address2 fields. Each should be configured like this:


2. Add the address fields to the form, to their respective sections.


Step 2

Add the JavaScript above to the web resource for Contact.  If you already have an onLoad method, just add those two lines of code to your method.


Step 2:

Add events to each of the Address Type fields:


Notice that the Pass execution context as first parameter is checked. This is vitally important and the process will not work without it..

Save and publish the form.


Step 3:

Testing using the following protocol:

1. Open a new Contact.

2. Change the value of the Primary Address type.

3. You should see the Primary Address section label change.

4. Repeat steps 1-3 for the Secondary address.

5. Save and close the record.

6. Reopen the record.

7. Verify that the section headers change.


Code Review

Let’s take a deeper dive into the code.  I could have hard-coded the section values into our JavaScript but I thought that it would be better to make a fairly generic version of our code.

Take a look at the beginning of function.

function addressType_onChange(executionContextObj) {
    var field = executionContextObj.getEventSource();

This code gets a handle to the attribute which fired the change event.

Since we are working with an OptionSet, we need to get the label for the currently selected value:

var addressType = field.getText();

Next, a check to make sure we actually have a value:

if (addressType != null && addressType != "") {

And finally, the tricky part:

field.controls.get(0).getParent().setLabel(addressType + " Address")


field is a handle to the attribute, but we need to get to the parent Section where the attribute resides. Unfortunately, the getParent() method is only associate with a form control. 

.controls.get ( 0 ).getParent() will get the parent of the first control associated with the attribute, with the parent being the Section itself

Note: This is making an assumption that the field is not on the form more than once.

Finally, setLabel() is actually going to reset the label for the Section using the value from the Address Type OptionSet and the word Address.



You can use the exact same technique with other field types, but you will need to modify the .getText method to .getValue and change the validity check statement to match the data type being retrieved.

Other than that, this is a pretty simple piece of code.

Hi Everyone,

I have an update to Transformer!, my JavaScript conversion utility for Dynamics CRM.


You may download the trial version here:



Updated documentation may be found here:



A full sample conversion may be downloaded here:



And just the conversion report from the sample conversion may be downloaded here:


Release Notes:

This release includes the following new functionality and conversions:


CRM 4.0 Web Service Usage Report

A new report has been added to the Conversion Report workbook that summarizes any calls made to the CRM 4.0 web service:


This is very helpful in determining how may web service calls that you have, that will need to be upgraded.



I attempt to determine if a JavaScript file is actually the jQuery library and if so, the conversion is skipped.


Third–Party Product JavaScript Libraries

A attempt is made to ignore JavaScript libraries associated with third–party products, assuming you are converting from CRM directly or from a CRM 4.0 customization export file,

At this point, Click Dimensions and ADX Studio (portal) scripts are ignored.  If you have other products that you have installed, then please let me know their customization prefix, and I’ll add it to the list.


Hide/Show Sections

There are several different methods to hide and show sections.  I’ve improved the conversion to handle two new cases I discovered:

pc[h].parentElement.parentElement.style.display = "none";

converts to



crmForm.all.new_onsiterepresentativeid_c.parentElement.parentElement.style.display = ";

converts to



Improved Partial Field Name Support

I have improved the conversion process concerning partial field names; those attributes that end with “_c” and “_d.”  They are more effectively converted which can eliminate a large number of conversion reports.



Remember the goal of the product is to convert as much of your code from the Dynamics CRM 4.0 object model to the Dynamics CRM 2011/2013 object model as is practical. While Transformer! will convert huge percentage of your code, there will still be much work that must be performed manually.

If you notice anything that does not get converted and you feel that it should have been, then please send me the code so I can perform some analysis.


Thanks, Mitch

We ran into a fascinating issue when creating Routing Rule recently.

Here is the rule:


This is fairly straightforward, but for some reason, we had an issue where the rule was not firing as we expected.

I turns out that behinds the scenes, CRM actually creates a workflow to handle the magic required to route the email.

Normally, you never really see these workflows run because they have the flag set to delete the history if the workflow was successful

But unfortunately, in our case, something was not configured correctly in this workflow and it was failing:


We modified the rule slightly and everything seemed to work fine after that. (I wasn’t the one doing the modification so I an not exactly sure what was changed.

Anyway, the moral of the story is that if you ever see strange workflows, that you did not create, failing, see if they are Routing Rules.

SCOM Pack for Dynamics CRM 2013 is out.

The views, monitors, rules, and knowledge specific to Microsoft Dynamics CRM 2013 that comprise this Management Pack provide the means for System Center Operations Manager users to centrally manage the server application, its component services, and the computers on which they run. The Monitoring Pack for Microsoft Dynamics CRM 2013 also contains monitoring for the Microsoft Dynamics CRM 2013 E-mail Router and Microsoft Dynamics CRM 2013 Reporting Extensions.

By managing these Microsoft Dynamics CRM components in System Center Operations Manager, the administrator can respond quickly to critical events and key performance indicators, and take action to prevent service outages, reduce the resolution time for alert conditions, and increase the overall availability and performance of the Microsoft Dynamics CRM system.

Feature Summary

  • Monitors the availability and heath of the following components
    • Microsoft Dynamics CRM Server 2013
    • Microsoft Dynamics CRM 2013 E-mail Router
    • Microsoft Dynamics CRM 2013 Reporting Extensions
  • Monitors the availability and health of the following component services:
    • Microsoft Dynamics CRM Asynchronous Processing Service
    • Microsoft Dynamics CRM Asynchronous Processing Service (maintenance)
    • Microsoft Dynamics CRM Sandbox Processing Service
    • Microsoft Dynamics CRM E-mail Router Service
    • Microsoft Dynamics CRM Unzip Service
    • World Wide Web Publishing Service
    • Indexing Service
  • Monitors the availability and health of the following application components and functionality:
    • Operability of ISV plug-ins
    • Web application requests processing, SOAP exceptions, and unexpected failures
  • Monitors the performance metrics of the following components:
    • Web application requests processing
    • Database query processing
  • Monitors the system for configuration-related failures

Here is a small method to help you determine if a User is a member of a specified Team:

Just a reminder that today is the last day to register for next week’s workshop:

JavaScript Development with Dynamics CRM


Join while you can.

This turned out to be a very valuable article.


Email Router configuration error "Incoming Status Failure: No results were found"

In our case, it was because the mailbox was hidden.



  • Dynamics CRM 2013
  • Exchange 2007

Hi Everyone,

Just wanted to send you a reminder that next month we are holding two workshops for Dynamics CRM developers:

Plugin Development with Dynamics CRM

JavaScript Development with Dynamics CRM

This may be the last offerings of these workshops for the remainder of the year.

Let me know if you have any questions.

Thanks, Mitch

Just wanted to send everyone a final note about the CRM Architect class that starts next week.

You may register using the following link:


Registration ends at 1:00pm CDT on Monday, August 25th.

The purpose of this class is to discuss the basic technical areas of expertise and skillsets that must be developed on your path to becoming a Dynamics CRM architect. In part, if not in full.

Much of the class involves group discussions for scenarios based on the requirements of real–world Dynamics CRM customers. We will discuss the requirements, the options, and finally the proper solution.

Finally, we will actually design, from scratch, a Dynamics CRM system for two separate customers.



Week 1: August 26th and August 28th

Week 2: September, 2th and September, 4th

Week 3: September, 9th and September, 11th

Week 4: September, 16th and September, 18th

Week 5: September, 23rd and September, 25th

Week 6: September 30th and October 2nd


8:00am–10:00am CDT (UTC -5)



$2,495 per student




Week 1: Introduction to the Dynamics CRM tools and technologies.

The two sessions of the first week will be exploring the tools and technologies that an architect needs to know and understand in order to properly select solutions for a given problem or requirement. The Tuesday session will focus on server–based technologies while the Thursday session will be focused on client technologies.


Week 2: Feature–based scenarios.

Week 3: Feature–based scenarios.

Week 4: Feature–based scenarios.

These sessions will consist of scenario–based training where we will review the requirements for a specific aspect of a customer’s CRM system, discuss the alternatives, and select what we feel is the proper solution to the problem. Each session will usually cover four scenarios but that will vary depending on the breadth of the requirement.


Week 5: Case study and system design. Scenario #1: Sarah’s Personal Concierge Service

Sarah has been a personal concierge for the past five years and would like to grow her business, bring on additional employees, while maintaining the personal feel that has made her in such demand.


Week 6: Case study and system design. Scenario #2: Billy Joe’s Oil and Gas Works

Billy Joe is an up and coming wildcatter who wants to build an oil and gas exploration company using cutting–edge technology and processes so he can get the most productivity with the lowest overhead possible.

Please let me know if you have any questions

I was trolling the Xamarin.Forms forum when I saw this question:

Can you limit a Slider to only allow integer values? (Hopefully snapping to the next integer)

I dug around a bit I found this solution on StackOverflow.  I did a quick and dirty conversion to Xamarin.Forms, but wanted to make it a little better, more Xamarin.Formy.

So, here is the answer to this question:


ExtendedSlider Class

The first thing we need to do is create a new Slider class that has our “stop” value, which we do using the following code:

public class ExtendedSlider : Slider
    public static readonly BindableProperty CurrentStepValueProperty = 
           BindableProperty.Create<ExtendedSlider, double>(p => p.StepValue, 1.0f);

    public double StepValue
        get { return (double)GetValue(CurrentStepValueProperty); }

        set { SetValue(CurrentStepValueProperty, value); }

    public ExtendedSlider()
        ValueChanged += OnSliderValueChanged;

    private void OnSliderValueChanged(object sender, ValueChangedEventArgs e)
        var newStep = Math.Round(e.NewValue / StepValue);

        Value = newStep * StepValue;

All this really does is converts the current slider value from a double, into an integer.


Demonstration Page

Here is a fully functional demonstration page:

public class SliderDemo : ContentPage
    public SliderDemo()
        var sliderMain = new ExtendedSlider
            Minimum = 0.0f,
            Maximum = 5.0f,
            Value = 0.0f,
            StepValue = 1.0f,
            HorizontalOptions = LayoutOptions.FillAndExpand,

        var labelCurrentValue = new Label
            HorizontalOptions = LayoutOptions.CenterAndExpand,
            BindingContext = sliderMain,

                                        new Binding("Value", BindingMode.OneWay, 
                                            null, null, "Current Value: {0}"));

        var grid = new Grid
            Padding = 10,
            RowDefinitions =
                new RowDefinition {Height = GridLength.Auto},
            ColumnDefinitions =
                new ColumnDefinition {Width = new GridLength(1, GridUnitType.Star)},
                new ColumnDefinition {Width = new GridLength(1, GridUnitType.Star)},
                new ColumnDefinition {Width = new GridLength(1, GridUnitType.Star)},
                new ColumnDefinition {Width = new GridLength(1, GridUnitType.Star)},
                new ColumnDefinition {Width = new GridLength(1, GridUnitType.Star)},

        for (var i = 0; i < 6; i++)
            var label = new Label
                Text = i.ToString(CultureInfo.InvariantCulture),

            var tapValue = i; // Prevent modified closure

            label.GestureRecognizers.Add(new TapGestureRecognizer
                Command = new Command(() => { sliderMain.Value = tapValue; }),
                NumberOfTapsRequired = 1

            grid.Children.Add(label, i, 0);

        Content = new StackLayout
            Padding = new Thickness(10, Device.OnPlatform(20, 0, 0), 10, 10),
            Children = { grid, sliderMain, labelCurrentValue },
            Orientation = StackOrientation.Vertical,
            HorizontalOptions = LayoutOptions.FillAndExpand,
            VerticalOptions = LayoutOptions.FillAndExpand

If anyone has a better way of doing this, then please let me know.

I’ll probably add this to the Xamarin.Forms Labs project sometime this week.

Sign up for our new KnowledgeBits service and get news, tips and tricks and more, delivered straight to your inbox.