Category Archives: Dynamics CRM

Tips and techniques I've collected while working with Microsoft Dynamics CRM 3.0

Free Webinar: Productivity Maximized using GoToWebinar and Click Dimensions

Hi Everyone,

This year I implemented a new program I call Teaching on Tuesdays where I hold free webinars on various topics ranging from Dynamics CRM, to Xamarin, to business and development best practices.  Averaging at least two webinars a month has allowed me to refine my work so that I have a repeatable process that I can follow each time.

Two of the tools I use on at least a weekly basis, if not daily, are GoToWebinar and Click Dimensions.

I use GoToWebinar (and GoToMeeting) to host all of my meetings and webinars and Click Dimensions handles everything from adding webinar participants to Dynamics CRM, to sending notification emails, to collecting additional information using forms and surveys.

In this webinar we will be discussing the following:

  • Setup and Configuration of the Click Dimensions GoToWebinar connector
  • Planning your webinar
  • Marketing your webinar
  • Reducing webinar SPAM (yes, there is such a thing)
  • Conducting your webinar
  • Recommended equipment
  • Collecting attendance statistics
  • Communicating with both registrants and attendees
  • Recording your webinar and publishing it to YouTube
  • Plus much, much, more

You’ll also receive a step-by-step guide that I have created which documents each of the steps required to plan, host, record, and follow-through with a webinar.

I hope to see you there.

Tuesday, Sept 15, 2015 11:00 AM – 12:00 PM CDT       Register Now


Thanks, Mitch

Dynamics CRM JavaScript: Ensure the current record is Saved before opening a new record

In yesterday’s post, Tracing the Dynamics CRM Form Data save Operation, I discussed identifying data that would be sent to the database when you saved a Dynamics CRM record.

Part of the issue I was facing was related to the form not completing the save operation before I opened a new form record. Since Dynamics CRM 2013 and 2015 user interface rarely opens a new window, the user was getting a warning that there was unsaved data when the page was being switched between the Account and, in this case, the Opportunity record.

So to prevent this from happening, I had to wait for the save to complete then open the new Opportunity record.

Here is the code where I do that:


var parameters = { customer_id: customerId, customer_name: customerName, customer_type: customerType, name: Xrm.Page.getAttribute("name").getValue() }; var windowOptions = { openInNewWindow: true }; setTimeout(function () { openNewForm(parameters); }, 2000); } function openNewForm(parameters) { var windowOptions = { openInNewWindow: true }; Xrm.Utility.openEntityForm("opportunity", null, parameters, windowOptions); }

The Details

We are using the JavaScript method setTimeout to wait for 2,000 milliseconds (2 seconds for those of us who are not computers).

At the end of the wait period, we will call a function called openNewForm which will use the Dynamics CRM method Xrm.Utility.openEntityForm, which opens a new Opportunity form.

You may need to adjust the wait period up or down, depending on your environment. The idea is to wait long enough for the save to complete, but not long enough to irritate the user.

Tracing the Dynamics CRM Form Data save Operation

I ran into an interesting issue this week where I was opening up a new Opportunity Entity form from the Account record via a Command Bar button.

The issue was that I was getting a warning that I was about to discard changes to the record I was leaving, and would l like to Continue or Cancel.

I verified all of the JavaScript and found that I was not performing any updates on form load, so there must be something else happening to modify a value on the form so that CRM thinks the record needs to be saved.

But what was being changed?

I thought about it for a bit and realized I could have CRM tell me what was happening, though a little known or used method called

Dynamics CRM, by and large, does not send unaltered data to the database when a Save occurs. By using getDataXml, I can see exactly which field or fields were being modified.


To implement this code, I created a small onSave method:

function onSave() {

Then created an OnSave event on the form properties:


Note: Make sure this event is the final OnSave event to ensure that all of the other OnSave events have completed.

This will display a message box showing what fields have been changed and the new values. Basically the same thing that will be sent to the database.


It turns out that in this particular case, I was programmatically:

  1. Setting a field value
  2. Saving the record
  3. Opening a new related record

The issue was that the Save operation had not completed so the field I had modified was still considered dirty.

This allowed me to correct that issue and now things work as expected.

Up Next

My next article will outline how to work around the saving of the record while navigating to another record issue I ran into above.

Free Webinar: Dynamics CRM Plugin Development Basics

Hi Everyone,

Just a reminder of my next free webinar:

Dynamics CRM Plugin Development Basics

In this webinar we will discuss the basics of Dynamics CRM plugin development including: What plugins do, how they are architected, the development tools you will need, and what it will take to develop your first plugin.

Tuesday, August 25th, 2015 11:00 AM – 12:00 PM CDT       Register Now


Thanks, Mitch

Dynamics CRM JavaScript: Working with Tabs and Sections-The right way

Back in March I wrote the following article: Dynamics CRM Developer Tip O’ the Day: Working with Tabs.

Today I was working on some pre-existing customer JavaScript and ran across this:

Xrm.Page.ui.tabs.get(0).sections.get(6).setVisible(false); // Hide section

Don’t ever do that! Bad developer! Bad!

So again, never, ever use the numerical value to reference a Tab or a Section, unless you have no choice. 

We don’t want to use numbers because if you move or add Tabs or Sections, your code will no longer work.

Do this instead:

Xrm.Page.ui.tabs.get("General").sections.get("Details").setVisible(false); // Hide section

As long as your Tabs and Sections are named properly, you should not have an issue.

Help! I can’t create quotes!

[Dynamics CRM 2013]

One of my customers emailed in a panic (rightfully so), because they could not create a Quote from an Opportunity.  When they did so, the following error popped up:


Actually, you have to hover over the error on the status bar to see it pop up.

I looked around for 30 minutes or so and could not see any issues recorded in any log that you might think of.

He had already restarted the SQL Server and I restarted IIS on the CRM Server but still the error persisted.

Having nothing left to do, I decided to look at the CRM services on the CRM Server.  Sure enough, several were turned off.


Start/Restart all of the CRM-related services on the CRM Server.

I did a little testing and it appears that the Sandbox Service was the one directly responsible for the inability to add a new Quote, but just to be safe, I restarted them all.


This is a very fascinating situation and one that I’ve never seen before.

Free Webinar: The 7 Steps of Dynamics CRM Development


Interested in becoming a Dynamics CRM developer or adding to your existing Dynamics CRM skillsets?

In this webinar we will cover the seven areas (steps) you need to master to become a Dynamics CRM developer and will discuss the tools and resources to help guide you on your journey.

Monday, Aug 24, 2015 1:00 PM – 2:00 PM CDT       Register Now

DFW Mobile .NET meeting this week: Mobile Design Patterns with Xamarin Forms

I am presenting at the DFW Mobile .NET meeting on Wednesday, August 12th.  You can find out more, and register for the meeting here.

In this discussion we will cover both user interface and code–based design patterns many developers may encounter while working with Xamarin Forms to develop cross–platform mobile applications.

I hope to see you there.


August Training: Turn your .NET Developer into a Dynamics CRM Developer

Course Description

If you are looking to get started with Dynamics CRM development, and are looking for an instructor-led, hands-on workshop, then let me introduce you to Turn your .NET Developer into a Dynamics CRM Developer.

In case you did not know, Microsoft decided to only offer the Extending Dynamics CRM course via eLearning, starting with Dynamics CRM 2013. eLearning, which is a self–study program, is great for many people, but I think students gain a tremendous amount of learning and understanding from having an instructor who works with Dynamics CRM development on a daily basis. This student-instructor interaction combined with the ability for the student to ask questions and obtain clarifications, makes this course all the more valuable.


This class is taught by Mitch Milam, nine–time Microsoft Most Valuable Professional for Dynamics CRM and an independent consultant specializing in Dynamics CRM architecture, development, and training.


We have taken the topics normally covered by the official Microsoft Extending Dynamics course, and expanded their depth quite substantially. Instead of a three–day course, this is a five–day course with most of the extra content being the addition of a large number of hands–on labs. The information covered is relevant to both Dynamics CRM 2013 and 2015.


Monday, August 31st through Friday, September 4th.

Class starts at 8:00am CST and will last five or six hours per day, depending on the day. Please budget the entire day so that you have time to complete the homework assignments.


This is an Internet-based workshop. Classroom time and discussions will be facilitated using GotoMeeting. Each student will be given their own virtual development environment for the duration of the course. This will allow for the completion of labs and homework without causing conflicts with the other students.

Ready to Make the Investment?

The price per student is $2,495 with the class limited to 20 students.

Eventbrite - Turn your .NET Developer into a Dynamics CRM Developer (August)

A 10% discount applies for two or more developers.

We are also offering a payment plan of $239.00 per month, for 12 months.

Contact me (mitch at xrmcoaches dot net)  for more information on either of these options.