Category Archives: Dynamics CRM

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

Free Webinar Friday: JavaScript and .NET Code upgrade best practices

Hi Everyone,

This week’s free webinar Friday will be:

JavaScript and .NET Code upgrade best practices

In this webinar we will discuss upgrading your JavaScript and .NET code from version the Dynamics CRM 4.0-level APIs to the Dynamics CRM 201x-level APIs.  There is still a lot of code that was never upgrade from 4.0 to 2011 during the initial migration and as companies move toward Dynamics CRM 2016, it is imperative that this code be updated. This is is a follow-up to last Friday's JavaScript upgrade walk-through webinar I did, but It contains a wider range of information.

Fri, May 27, 2016 10:00 AM – 11:00 AM CDT   Register here.
Drop me a line if you have any questions or suggestions.

Thanks, Mitch

New Workshop: Understanding Dynamics CRM Processes

Hi Everyone,

I have been trying to formalize some of my Dynamics CRM automation and processing training and I think I’ve finally found a format that I am happy with.

Let me introduce you to my new workshop: Understanding Dynamics CRM Processes.

Here is a little about the course:

Goal

When you finish this workshop you will have a very deep understanding of Dynamics CRM process, how to design and build them, and how they will benefit your business.

 

Hands-On

I am a huge believer that nothing makes you understand a new concept or technology better than just doing it yourself. That means you’ll be doing a lot of exercises and there will also be homework.

 

Live Environment

We’ll have a real playground in which to play by using a Dynamics CRM environment for all of our work.

 

A Different Style of Course

Instead of dedicating a full day to training, we’ll be meeting once per week for two hours. Can’t make a session? Don’t worry, they will be recorded and you can replay them later and just perform the work on your own, just like you are in class.

Class with start on Tuesday, June 21st and run through Tuesday, July 19th.

I will actually have two sessions: 10am-12pm CDT and 6pm-8pm CDT, so that people can fit it into their already busy schedules.

 

What You Will Learn

Here is a brief summary of the topics we’ll cover:

Workflows

From the basics to the advanced, you’ll learn everything that you need to know to understand, create, and maintain custom workflow processes.

Dialogs

So I’m sure you’ve heard the phrase “Dialogs” but don’t really understand what they are and how you would use them. Like workflows, we’ll be covering them in-depth so you can see for yourself.

Business Process Flows

I’m sure you have seen the progress bars on the Lead and Opportunity entity that give the user a quick indication of where that specific entity record is within the process. You’ll learn how to create and maintain these process flows to fit your business.

Custom Actions

Custom Actions have been around for a while but are often overlooked. We’ll discuss how and why they are used so you can see if they can be of benefit to your business.

 

Frequently Asked Questions

Here are a few questions that have come up while building out the course:

Who is this workshop for?

This workshop is for anyone who is classified, or classifies themselves, an administrator or power user. Or, it is for anyone who wants to expand their Dynamics CRM product knowledge. (see the next question.)

Am I qualified to attend?

Do you have at least a basic understand of how Dynamics CRM functions, how data is stored, and how to navigate around the application?  If so, then yes, this workshop is for you.

Will there really be homework?

Yes. With only two hours of class-time per week, there will a lot that you will need to accomplish on your own.

 

Ready to Investment in Yourself?

The cost of the course is a one-time payment of $997.

Preferred Session:

Dynamics CRM SDK Version 8.1.0 Release Notes

The Dynamics CRM SDK was updated on 6 May and here is a list of the changes.

Apply SLAs to entities

New topic containing information about the SLA support for various entities in CRM.

Azure integration with Microsoft Dynamics CRM

Work with CRM event data in your Azure Event Hub solution

Write a listener application for a Microsoft Azure solution

Walkthrough: Configure Microsoft Azure (SAS) for integration with Dynamics CRM

Walkthrough: Update a service endpoint from ACS to SAS authorization

Walkthrough: Update a service endpoint imported from a solution

New or updated Azure related topics containing information about new features including SAS authorization, support for event hubs, and multiple messaging data formats for cross-platform interoperability.
The restriction to use the Azure SDK version 1.7 or 1.8 has been changed to version 1.7 or later.

Create packages for the CRM Package Deployer

Updated the topic to include information about the new capabilities that enable developers to control how the packages will be deployed while creating packages.

Default SiteMap XML

Updated the topic about the inclusion of the interactive service hub in the default CRM sitemap.

Knowledge base search control (client-side reference)

Updated the topic to include information about the new client APIs in this release.

Microsoft Dynamics CRM Web API Limitations

Added the following additional limitations:

•    Can't query date values
•    Web API not enabled for Microsoft Dynamics CRM for Outlook with Offline Access while user is offline

Query Data using the Web API

Added the following sections about CRM Web API enhancements in this release:
•    Filter records based on single-valued navigation property
•    Retrieve related entities by expanding navigation properties

ServiceEndpoint entity messages and methods

The ServiceEndpoint entity has new attributes for SAS configuration. The NamespaceAddress and NamespaceFormat attributes have been added to support full namespace addressing in addition to the existing option of specifying just the namespace name.

Use the Category entity to categorize CRM records

Category entity messages and methods

Topics added that contain information about how you can use the new Category entity.

Use the Feedback entity to manage feedback and ratings for CRM records

Feedback entity messages and methods

New topics containing information about how you can use the new Feedback entity.

Write and debug scripts for CRM for phones and tablets

Renamed the topic from Write and debug scripts for CRM for tablets, and updated the contents to include information about the client API support for CRM for phones and tablets.

Write and debug scripts for the interactive service hub

New topic containing information about the client APIs supported in the interactive service hub.

Write code for Microsoft Dynamics CRM forms

Added entities to list of Updated entities that now support the improved form rendering experience in CRM.

What's new for administrators and customizers in Microsoft Dynamics CRM 2016 and CRM Online

I accidentally stumbled across this article today.  Really worth the time and effort to read and a really great summary of the new stuff.

Here is a quick summary of the bullet points.

First look at the Dynamics CRM Organization Insights Dashboard Preview Feature

Dynamics CRM Online 2016 Update 1 has included a preview feature to allow you to view some collected statistics on various operations within your Dynamics CRM organization.

Since this is a preview feature, you must activate it from the Previews tab of System Settings:

Systems Settings - 2016 Preview

This will activate a new dashboard called the Organizational Insights Dashboard.

Take a look at this article for more in-depth information on what metrics are collected and how it is supposed to work:

Preview feature: View metrics about your instance with Organization Insights dashboard

 

Also keep in mind that this is a preview feature and it is subject to change without notice.

That being said, it looks like a really cool addition to our Dynamics CRM Online management toolbox.

Free Webinar Friday: Introduction to the Dynamics CRM Interactive Service Hub

Hi Everyone,

This week’s free webinar Friday will be:

Introduction to the Dynamics CRM Interactive Service Hub

In this webinar we will discuss the Interactive Service Hub feature of Dynamics CRM 2016 and how it can be used to increase the productivity of your service desk personnel.

Fri, May 20, 2016 10:00 AM – 11:00 AM CDT  Register here.

Drop me a line if you have any questions or suggestions.

Thanks, Mitch

Developing Dynamics CRM Plugins? I could use some feedback

Hey Everyone,

I’m finishing up my Deep Dive Plugins book and I am curious about the types of examples you feel would help you learn how to develop plugins.

If you have a couple of minutes, please let me know.

Hear a few I already have:

  • Qualify a Lead
  • Create a Marketing List
  • Create a list of associated records
  • Perform a zip-code lookup
  • Update a parent record when the child record changes

The link to the survey is here.

Thanks, Mitch

Bad Design: A tale of De-Architecture and De-Engineering

Every one of us has been guilty, or will be guilty, of creating a bad solution to a problem at some point in our career. If you have not done so yet, just be prepared, your day will come. Smile

Most of the time, people do not start off trying to create a bad solution, it just ends up like that. The cause can be just about anything, but here are a few:

  • Bad information (from research or the customer)
  • Change in design of Dynamics CRM (i.e., they changed something and didn’t tell you)
  • Assumptions
  • Over-thinking a problem
  • Under-thinking a problem
  • Unfamiliarity with the product, its features, and functionality points

Background

Back in 2011 I inherited a customer from another consultant who was too busy to handle the upgrade from CRM 4.0 to 2011. The system had been fairly customized and had a variety of plugins and a fair amount of JavaScript.

One of the things that had been done was to modify the calculations of the Quote/Order/Invoice system in order to incorporate a customer-requested design change.

When I saw the code, and there was a lot of it (plugins and JavaScript), I question the consultant on why it had been done this way. His reply was, “they had very specific requirements about how everything was calculated.”  Looking at the code, I could honestly not see what would have caused anyone to rewrite the calculation engine, but that is what had been done.

The main part of the customization was that custom total fields were added and the calculated values were stored in those fields while also updating the original total fields with the custom calculations.

The one thing that was different and extremely important was a custom field that allowed the user to enter a specific price per unit that would take the place of any system-calculated price.

So I upgraded everything, cleaned up the code a bit, and everything continued to work as designed/requested.

Then we upgraded to CRM 2015, and things started to NOT work as design.  Specifically with the Opportunity Product.  You would change a value and see before your eyes, the numbers change.

After spending about 3 hours one night tracing the actions of the system, I found this flow:

  1. User changes the quantity on the form
  2. Our custom JavaScript fires
  3. Internal CRM JavaScript fires which performed a calculation and saved the record
  4. Our custom Plugins fire
  5. [Possibly] Internal CRM plugins fire

The net result of this was that Dynamics CRM was overwriting our newly calculated values with their own, which was driving the users crazy.

Dynamics CRM Internals Notes

If you did not know, the Quote, Order, and Invoice entities are exactly the same, just in different buckets. Also, the Opportunity Product, Quote Product, Order Product, and Invoice Product entities also share the same structure.

These entities are really hard to customize because there is a fair bit of magic that happens behind the scenes through either JavaScript or Plugins, or both.

Also, even though these entities are similar in layout and design, it would appear that do not all function exactly  the same.

Also, everything is version-specific.  With CRM 2015, only the Opportunity Product uses the new form design. Quote/Order/Invoice Products still use the Information form.

Also remember that starting with Dynamics CRM 2013, the QOI and Opportunity forms were all redesigned to use the new layout which includes an editable grid for the Product line items. Since you can create records from the grid, and even change some fields, keep in mind that any JavaScript on the Product detail form will never be executed.

Any work that must be done on the create of one of these records must be accomplished using a plugin.

The Problem

The main problem was the internal Dynamics CRM code was overwriting the results of our custom code – somewhere – and after reviewing the facts, I realized there was just no way I could circumvent the actions of the product.

Correcting the Problem

The solution to this problem was actually rather simple and I still wonder why this wasn’t tried before.

It turns out that there is a Manual Discount field which is actually used by the automatic calculation engine.  After spending about 30 minutes with the customer, we were able to successfully test the use of the Manual Discount field as the basis for our custom per unit price.

I used that field to reduce the price per unit so that the calculation appeared to be using the manually entered price per unit, even though it was not. The code looks like this:

Code Snippet
  1. function newDiscountCalculation() {
  2.     if (Xrm.Page.getAttribute("new_netpriceperunit").getValue() == null) {
  3.         Xrm.Page.getAttribute("manualdiscountamount").setValue(0.00);
  4.         return;
  5.     }
  6.     var priceDifference = Xrm.Page.getAttribute("priceperunit").getValue() –
  7.                           Xrm.Page.getAttribute("new_netpriceperunit").getValue();
  8.     if (priceDifference === 0) {
  9.         return;
  10.     }
  11.     var manualDiscount = (priceDifference –
  12.                           Xrm.Page.getAttribute("volumediscountamount").getValue()) *
  13.                           Xrm.Page.getAttribute("quantity").getValue();
  14.     Xrm.Page.getAttribute("manualdiscountamount").setValue(manualDiscount);
  15. }

 

So that took care of the data issue, the remainder of the problem was corrected by removing ALL of the custom JavaScript and Plugins that also performed the calculations.

The only issue that remained was we had years worth of data in the wrong fields and many of the additional functionality points: Templates, reports, etc., were using these custom total fields.

Final Results

So here are the results of this process:

Functionality

As far as the users go, there was not change to the functionality they have been using for the past 7 years or so.

Plugins

I decommissioned and removed five plugins because their function was either unnecessary or redundant. The plugins that currently exist perform addition functions but the only pricing-related things they do are to put the values from the standard total fields into the custom total fields because those are the fields that are being used throughout the entire system.

JavaScript

About 95% of the JavaScript related to these entities was removed. Most of the work is actually done in the QOI Product entities and since the fields are named the same, I was able to have a single JavaScript library shared among all of these entities.

Lessons Learned

You’ve probably heard me say this many times but it is never a good idea to recreate Dynamics CRM built-in functionality.  Sooner or later you will pay the price for that decision and it is never pretty.

So, don’t do it.

Announcing the Dynamics CRM Developer Bootcamp in June

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 the Dynamics CRM Developer Bootcamp.

This course provides an introduction to the technologies, tools, and processes required to turn a .NET developer into a Microsoft Dynamics CRM developer. In–depth coverage is provided for both client and platform technologies through the use of real–world lab scenarios. Students will also be exposed to the most current third–party tools to aid them in their development efforts and finally, each student will receive a collection of templates and code–libraries to jump–start their development efforts.

Is this course for me?

If you are a developer who is just starting your journey into Dynamics CRM development and who needs to gain an understanding of the technologies, processes, and tools required to be a Dynamics CRM developer, then the answer is Yes!

Likewise, if you have been thrown into Dynamics CRM development (either voluntarily or kicking and screaming) and need to fortify your knowledge, then this course is also for you.

What you will learn:

The information covered is relevant to Dynamics CRM versions 2011 through 2016 (though some topics are specific to one version or the other). Here is what we cover:

  • Using the Dynamics CRM SDK with .NET to perform platform and query operations
  • How to create plugins and custom workflow activities
  • How and when to use the Dynamics CRM JavaScript object model
  • How to edit the Dynamics CRM SiteMap and the Ribbon components
  • How to create and use solutions effectively
  • You’ll also learn where to find, and how to use, the free tools available for both Dynamics CRM developers and administrators

Your instructor:

This class is taught by Mitch Milam, ten–time Microsoft Most Valuable Professional for Dynamics CRM and an independent consultant specializing in Dynamics CRM architecture, development, and training.  This is your chance to learn from someone who has been developing with Dynamics CRM on a daily basis since Dynamics CRM version 3.0.

The dates:

Monday, June 6th through Friday, June 10th.

Class starts at 8:00am CDT and will last five or six hours per day, depending on the topic. Please budget the entire day so that you have time to complete the homework assignments. Class will end around mid-day on Friday, depending on the speed of the students.

Prerequisites:

This is a developer course so you must know:

  • Visual Studio, .NET and C#
  • Have a familiarity with the Dynamics CRM product
  • Passing familiarity with JavaScript

Course format:

This is an Internet-based workshop. Classroom time and discussions will be facilitated using GotoMeeting and we will be using Dynamics CRM 2016 Online  for our development environments. This will allow for the completion of labs and homework without causing conflicts with the other students.

The investment:

The investment for a standard developer ticket is $2,995.

The standard developer ticket with an additional four hours of follow-on coaching is $3,495.

Discounts are available for multiple students and a payment plan is also available to help spread the cost.

Sign up today!

Bonuses:

Students will also receive the following tools and resources, valued at over $500. Here is what you get:

  • Single-organization license for SnapShot! for Dynamics CRM
  • Electronic copies of my Deep Dive book series: Plugin Development, Administration, Security, and Query Strategies
  • Templates and code libraries that I used in my everyday development efforts