Tag Archives: MSDYNCRM

Dynamics CRM 2015 Spring: Delete Plug-in Trace Log Records

So I am digging around the Dynamics CRM 2015 Spring Update, as I am apt to do, when I ran across something that needs to be changed.

There is a recurring bulk delete job that automatically deletes any plug-in trace log records older than one day, as you can see below:


This is a little too quick for my taste, so I would advise changing this value to be something longer, like seven or thirty days.

The real issue is that we cannot change the query used to select the jobs, but we can change the recurrence pattern.

Modifying a Recurring Job

To change a recurring job, perform the following steps:

1. Navigate to Settings, Data Management, Bulk Record Deletion.

2. Change your view to be: Recurring Bulk Deletion System Jobs

3. Open the bulk delete job in question.

4. Click the Actions button, the select Modify Recurrence. You will see the following dialog:


5. Change he following settings:

  • Run the job after every X days
  • Start time

Choose values that fit your organization.

6. Click the OK button.

That should change the recurrence so that the interval between runs is longer.

Beacon Idea #5: Retail, Analysis, and Dynamics CRM

So if you have been reading my blog frequently over the past few months you will notice that I have been doing  lot of mobile-related development, mostly with the Xamarin platform (which I absolutely love, btw).

One of the projects that I’m working on will involve the use of beacon, or iBeacon, technology.  I thought I would spend a little time today discussing how you can unite beacons and Dynamics CRM to collect a variety of information about your prospects and customers.

A Bit about Beacons

iBeacon is Apple’s technology for indoor positioning, where you need a finer-grained position that can be achieved using GPS. Apple decided to make the iBeacon specification available to other vendors and companies like Qualcomm and Estimote have products that are iBeacon compatible.

There are alternative beacon technologies available that are not iBeacon compatible, so for the sake of simplicity, I’ll just refer to everything as a “beacon” to keep things generalized.

Beacons are just transmitters that broadcast their position using Bluetooth Low Entergy, or BLE.

The intelligence dealing with where the beacons are located and their distance from the receiver, must be handled within an application that has connected to a mobile device’s BLE signal.

Currently, late models of iPhone, Android, and even some Windows Phones are equipped with a BLE interface which will allow you to write applications that can search for an recognize beacons.

Again, the beacon just announces, “here I am” and the application on the mobile device does the real work of “seeing” the beacon and deciding upon the next course of action.

The Retail Connection

One of the most talked about areas for the use of beacons is in a retail environment – and the possibilities are truly endless. 

Here is a sample scenario:

Customer Visit Tracking

It is possible to install beacons various locations within a store and track the following:

  • When the customer entered or exited the store
  • The amount of time spent within the store
  • The departments visited
  • The amount of time spent within a department
  • Purchases

All of these data points are primarily centered around a customer having an application on their phone that can interact with the beacons and send the data back the the cloud-based collection system.

Data Analysis

The one thing you really need to be careful of when capturing beacon data is the amount of data produced. The data flow will dictate the design of your beacon data storage and what tools you use to perform the analysis.  There are several possibilities here:

  • Estimote has built-in analytics for their beacons
  • You can roll your own using Azure App Services to both record the data and perform analysis
  • Add it to your internal SQL Server data system and use tools such as PowerBI to perform the analysis

The Dynamics CRM Connection

Let me state right up front that Dynamics CRM is not where you put your beacon data. There will, in most cases, be too much data and there are better, faster, and cheaper alternatives for both the storing and analysis, like the ones mentioned above.

After you have collected the data and performed the analysis is when you connect it to Dynamics CRM.  The primary use of any Customer Relationship Management system is to record data about a customer:

  • When do they shop?
  • What do they like to buy?
  • Are they purchasing for them selves or a family member?
  • Do they have a brand-preference or a deal-preference?

Use your analysis tools to deliver that type of information by using data obtained from their purchase history, the beacon data, and your web site. That is how you can improve the interaction of your company with the customer.

Make sure your marketing department makes good use of this new data and delivers to the customer the types of offers that make sense to them.

The key point here is value. You need to constantly be providing value to the customer.  It is not always about you; and yes, you need to sell things to stay in business, but it is much easier to sell to people who want to buy.

The Big-Brother Creepiness Factor

This type of process is fairly high on the big-brother creepiness factor but is really saved by the fact that the customer has opted-in to this program by:

  1. Installing the application on their phone
  2. Setting their personal preferences to allow their activities to be tracked

Physical Retail vs. Online Retail

What is so very ironic about this entire conversation is that Online retailers already collect this type of data each and every time a customer visits their web site.  Some are much better than others, but they all do it to a certain extent.

Deploying a technology like beacons to a physical retail store gives that company the ability to collect, and hopefully use wisely, the same types of data that their web site produces.  When you combine those two sets of data together, you can generate a more complete picture of the customer.


All of these things we’ve discussed today are fairly easily done, just remember one extremely key point: Do not be a pest. 

One one likes a pest, either in the online or physical retail world.

Upcoming Training: JavaScript Development with Dynamics CRM 2015

Hi Everyone,

I am holding my JavaScript development workshop in conjunction with the CRMUG Academy.

Visit this page to register.

Here are the details:

The goal of this 2 day class is to provide every student with a very thorough introduction to using JavaScript within Dynamics CRM. This is an Internet-based, hands-on workshop with each student provided their own virtual development environment for the duration of the class. Each classroom day will run from 10:45am to 5:00pm Eastern with the virtual environments available for student use until midnight on the second day.

And thanks to our virtual development environments, the majority of our time will be spent actually developing JavaScript solutions for Dynamics CRM. Think labs. Lots and lots of labs. And homework. There will be homework.

We’ll cover the following topics:

  • Creating a development environment ?Setup

    • Source control

    • Working in teams

    • Working with Visual Studio

  • Working with Web Resources

  • Working with Solutions

  • Working with Forms ?JavaScript libraries

    • Form events

    • Form Event Handler Execution Context Reference

  • Working with the Xrm.Page Object Model ?Working with Collections

    • Data operations

    • Tabs and Sections

    • Working with Controls

    • Working with iFrames

    • Working with Navigation Items

  • Ribbon button and JavaScript connection

  • Opening Dynamics CRM Forms and Web Resources via JavaScript

  • Using the XrmSrcToolkit to CRM-related data operations

We will be using about 75 of the methods found in the Xrm.Page object model so you should leave class with a fairly good understanding of where things are and how to access them. If we have time, we will also cover some of the freely available JavaScript components that can be used to aid in your development efforts and to increase your user’s productivity.

Students will also receive a draft copy of my upcoming book on Dynamics CRM JavaScript development along with sample code and utility web resources that should help you kick start your CRM JavaScript development efforts.

Using the XrmSvcToolkit to perform the following operations using JavaScript:

  • Create

  • Retrieve

  • Update

  • Delete

We will also be covering advanced topics such as working with the Dynamics CRM tablet client.

Student Prerequisite Knowledge:

  • Each student must have working knowledge of Dynamics CRM 2011, 2013, or 2015.

  • Knowledge of JavaScript is also required.

Preparation: The detailed instructions for connecting and attending the class will be sent one to two days prior to class. Students have the option of connecting to the class via conference call or VOIP. If using VOIP, a headset with a microphone is strongly recommended. Your instructor will use a hands-on training environment. You will receive a separate email with the setup instructions, and a dual monitor is strongly recommended to facilitate navigation.

Let me know if you have any questions.

Thanks, Mitch

Announcing Teaching on Tuesdays

Hi Everyone,

I have had this idea for a free webinar series that I call Teaching on Tuesdays.  Mostly because they will be held on Tuesday.

The idea is that I take a topic and have a webinar to introduce people to that topic and maybe get some questions answered that they may have.

The webinars will be free and will generally last between 30 and 60 minutes each.

I’ve created a Google Moderator site to record, which you can see here.  There are a few topics already added but feel free to add your own topics and vote up existing topics as you feel the need.

Please let me know what you think.

Thanks, Mitch

Dynamics CRM Developer Tip O’ the Day: Working with Tabs

I learned an important lesson yesterday, again, on working with tabs with Dynamics CRM forms.

There are several ways to reference tabs when writing JavaScript and using the Xrm.Page model.  You may reference the tab by number, like this:


Note: Tabs are numbered starting with zero for the first tab.

Or by name, like this:


It is always a best practice to use the name of the tab instead of the number because if you ever move the tab around the form, then the number will no longer be valid and any JavaScript you have written which references a particular tab in such a manner will start to cause some very strange user experiences.

By using the name of the tab, you will always be referring to the same tab, no matter where it may be located on the form.

In my particular case, this was a Dynamics CRM 2013 installation that had been upgraded from 4.0.  My JavaScript conversion tool, Transformer!, automatically converts the tab references using the number because of the naming convention applied to the converted forms, which is a GUID.

I had merged the original Information form with the new Entity form and in doing so, I had inadvertently moved the tabs out of place.  The logic in JavaScript involved changing the title of a tab as well as showing and hiding one of two different tabs, based on the value of an Option Set field.

I worked around my issue by renaming my tabs from the GUID value to tabxTab, which was the original CRM 4.0 naming format then modified my JavaScript to use that name instead of the number.

By the way, the same practice also applies to form Sections, which are named and referenced in a similar manner.

Dynamics CRM 2015 Spring: Plugin Trace Log

Yay! Finally, the good folks on the Dynamics CRM team have added the ability to log errors that occur in plugins and custom workflow activities.

Plug-In Trace Log

This is a new entity that we can access from the Settings, Customization area:




You need to enable the logging of exceptions to the plug-in trace log entity. Navigate to Settings, Administration, System Settings, then select the Customization tab.


Change the Enable logging to plug-in trace log setting to Exception.


Any time you have an unhandled exception in your plug-in or custom workflow activity, a log will be written to the trace log:


The detail looks like this:


Final Thoughts

This is a huge advance for those of us who develop with Dynamics CRM. Prior to this feature, we found I very difficult to record exception information, especially in CRM Online because any record we recorded to a logging entity was erased and when the transaction was rolled back, which was the common occurrence when exceptions were encountered.

This new entity and feature will be a most welcome addition.

Dynamics CRM 2015 Spring: New Forms Engine

The Spring Release of Dynamics CRM 2015 includes a new forms engine. You may have seen reference to this feature by the code name “Turbo Forms.”

The propaganda (marketing) says that we will get as much as a two or three times improvement in the rendering of a Dynamics CRM 2015 form.  My limited testing has not proven this statement but I can say that it is indeed faster.  I have a feeling that speed improvements will depend 100% on the contents of your form.

Let’s walk through the testing process.

Test Using Legacy Forms

The first test will be using the legacy forms to see what the original speed would be.  Perform these steps:

Test Setup

1. Clear your browser cache.

2. Navigate to Settings, Administration, System Settings.

3. Scroll to the bottom of the dialog and change the setting Use legacy form rendering to Yes:


4. Click OK to save your change.

Perform a Test

To perform the actual test, follow these steps:

1. Open a record such as an Account.

2. Press Ctrl+Shift+Q. This will open up the built-in and super-secret Performance Center tool.


3. Click the Enable button.

4. Refresh the web page (F5).

5. Press Ctrl+Shift+Q to display the Performance Center. This time, it will look something like this:


6. Click the very last flag on the right side of the Performance Center Window.

The text window below the graph will display something like this:


As you can see, it took a little over six seconds for all steps, including the loading of the sub-grids to occur.

Test Using New Form Renderer

To test using the new form renderer, perform these steps:

Test Setup

1. Clear your browser cache.

2. Navigate to Settings, Administration, System Settings.

3. Scroll to the bottom of the dialog and change the setting Use legacy form rendering to No:

4. Click OK to save your change.

Perform a Test

Repeat the testing steps performed earlier.

In my test, I see the following results:


The Results

So 4.4 seconds is not a 2x or 3x speed improvement but it is better than the previous form model. In addition, the form appears  to load faster.

One final caveat is this is a pre-release environment which, to my understanding, does not use the same hardware as production CRM Online.  This will probably mean that the speed will increase when the Spring Update finally reaches production release.

Final Thought

I’ll have a more in-depth article on the Performance Center soon.

Convergence Wrap-Up

This year’s Convergence conference in Atlanta was a blast.  Lots of new announcements for both the Dynamics product line as well as that of Azure.

In case you missed it, you can access many of the sessions in the Convergence Video Library, which I urge you to review as your time permits.

Convergence 2015 EMEA

Will be held in Barcelona, Spain on 30 November – 3 December 2015

Convergence 2016

Will be in New Orleans, Louisiana, USA, on April 4-7, 2016

Convergence 2015 (Atlanta) anyone?

Hi Folks,

If you are going to be in Atlanta, Georgia next week for Convergence 2015, please let me know.

I’ll be working in the Microsoft booth at these times:

  • Monday: 12-2
  • Tuesday: 3-5
  • Wednesday: 2-4:30

And I’ll be participating in at least one of the two Ask the MVP sessions:

If you are attending Convergence, look me up.  I’d love to hear what you are doing with Dynamics CRM.

Thanks, Mitch