You are currently browsing the tag archive for the ‘CRM 2013’ tag.

Configuring Entitlements in Dynamics CRM allows us to define how many cases are available to a customer for a certain duration. This functionality was introduced with Dynamics CRM 2013 SP1 in spring 2014. You must upgrade your Dynamics CRM 2013 Organization to Service Pack 1 to take advantage of this functionality.

When configuring entitlements by channel, there is one trick to be taken into consideration. Let’s say for client ABC we need to define entitlements for regular communication channels, like Web, Phone and Email. We also need to define a separate set of entitlements for social channels like Twitter and Facebook.

You need to actually configure in all Entitlements all Channels in order to be able to filter by channel.

Read the rest of this entry »

Welcome back. This is a follow-up to a previously posted article which was showing how to get to some basic data from the entity hosting our web resource. The article is HERE.

In this part we take a step further. We have the web resource loaded on the Account entity, and we need to get to the related Cases. For this post, we’re only going to be looking at getting a count of related Cases, as well as some basic data.

For the sake of simplicity, we’re going to include JavaScript and CSS in the HTML resource. You should always separate the resources though.

Let’s start with a simple HTML page structure:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
        <title>Context Info</title>
        <style type="text/css">
            body {
                background-color: #FFFFFF;


    <body onload="OnLoad()">


As you can see, in the onload of the body we’re calling a function called OnLoad(). Now let’s look at this function, and see what it does.

Right after we’re closing the style tag, add a new script tag. This will hold our function.


<script type="text/javascript">


Now let’s dig into our function:

function OnLoad() {


First off, let’s get the service URL built:

var _serverURL = window.parent.Xrm.Page.context.getServerUrl() +

Next, let’s build the XMLHttpRequest:

var AddressReq = new XMLHttpRequest();
      "GET", _serverURL + "/IncidentSet?$filter=CustomerId/Id eq (guid’" + + "’)", false);
                AddressReq.setRequestHeader("Accept", "application/json");
                AddressReq.setRequestHeader("Content-Type", "application/json; charset=utf-8");

Pay attention to the fact that we’re looking for IncidentSet to retrieve Cases, and we’re filtering by CustomerId/Id to be the same as the current Account record.

Once we get the response, let’s process the response. We’re only going to output a very simple response in out HTML web resource. Later we can start looking at using this data for something more advanced.

if (AddressReq.readyState == 4 /* complete */) {
    if (AddressReq.status == 200) {
        var retrieved = this.JSON.parse(AddressReq.responseText).d;
        var Results = retrieved.results;
        document.write("There is a total of " + Results.length + " Cases associated:" + "<br />");
        for (var i = 0; i < Results.length; i++) {
            document.write(Results[i].TicketNumber + " : " + Results[i].Title + " : " +
                Results[i].IncidentId + " : " + Results[i].Description + " : " +
                Results[i].StateCode.Value + " : " + Results[i].StatusCode.Value + "<br />");

Now put it all together, and your final result on the page should be similar to this:


So now I see my two related Cases listed on the Account form, along with some details.

Next time we’ll look at using this data in a more meaningful manner.


As notified by the InsideView Team, v3.2 introduced with the Dynamics CRM Online Spring 2014 release has a bug which can produce JavaScript errors that pop-up sporadically in a contact record. A fix has been release, and v3.3 can be downloaded from here.

The recommended approach is to un-install the old package and then install the new one.


The Microsoft Dynamics CRM Spring ‘14 Release Preview Guide has been released. Get your copy from HERE.

New exciting features are being announced. It’s definitely worth a read. Some of the highlights include:

Enhancements to Marketing – visual campaign designer. There’s lots of hype around this one in the Marketing circles.

Lead scoring enhancements, including scoring on recency and frequency.

Power BI for Marketing – calculate ROMI.

Insight – bring in real-time organization and contact information. Social Buzz and breaking news features added. Aggregate data from various social networks and other sources (blogs, Facebook, Twitter, LinkedIn, Outlook and connection sharing).

Unified Service Desk – handle multiple sessions simultaneously, as well as better visibility into key metrics.

Enhanced Case Management – merge cases, relate cases (parent-child), SLA support, automatic case creation. Also Social Case monitors social networks and identifies trends.

Parature – customer portal, Facebook portal, real-time chat. In addition, Parature adds enhancements to mobile, and to KB, finally supporting extended formatting of articles, and support for various media files.

Server-Side Sync for Online

Definitely looking forward to this big one!

At odd times you will be faced with some of the confinements of the new UI. One example is using an Option Set at the bottom of a section. After publishing you find that the actual drop-down is only showing two lines at a time. This is an undesired effect of the new UI. You are confined to a container, and the dropdowns do not know to extend past the borders of the container they live in. Here is the design:


And here is what you end up with on the published form:


Indeed, not very user friendly, especially when your selection list is longer.

Of course, you could try to relocate the control somewhere up in the container, but what if that field makes logical sense to be at the bottom of that container?

The solution is quite simple, the friendly Spacer comes to the rescue. Take a Spacer and add it to the bottom of the container. Now your form designer will look like so:


And now the users can breathe easy, as they can see a proper drop-down with more lines:


Add as many spacers as needed until you get it looking the way you want. Be mindful of the blank space you create underneath though, don’t exaggerate.


Just a quick note, for those implementations taking advantage of script customizations, if you are using


when upgrading to UR2, remember to check your scripts. This method is now deprecated.

For more details see HERE.

Happy scripting!

UR2 for Dynamics CRM 2013 has been released. You can download it from HERE.

The Build # for this release is: 06.00.0002.0046

Some of the notable improvements include, in no particular order:

Support for Windows 8.1

Support for IE11

Full support for Safari on iPads

Fixes for a few scripting errors

Of course, there’s a much longer list of fixes, and they are all described HERE.


This is another new feature of Dynamics CRM 2013. While in previous versions, we used to use JScript alerts to bring up field specific messages on forms, now we have two new functions available:




So how do we use then, and what do they do?

First off, let’s bring up a message on a field if a condition is met, or clear it otherwise:

function SetCustomNotification(controlName, controlMessage)
    var field = Xrm.Page.getControl(controlName);
    var condition = [evaluate your condition here];
    if (condition)

Pass in strings for controlName and controlMessage.

Set your function on either the onChange event of the field, or on the onSave event of the form. If you set it on form save, it’s a good idea to stop the save if the condition fails and the message comes up.

And the end results is your custom message showing as below:



This quick snippet comes in handy every now and then, and now it’s also tested for Dynamics CRM 2013.


I have a bunch of organizations, and a set of Organization Types. Let’s say, we have various client types, with various SLA’s.

In the Case entity, I want to show only the Organizations of specific type(s), that I can support through Cases.


First off, create a new web resource if one is not already created for the Case entity.

Then, from the form load event, call this function which uses addPreSearch.

function preFilterLookupOrganization() {   
    Xrm.Page.getControl("control_name").addPreSearch(function () {

This is from the SDK:


Use this method to apply changes to lookups based on values current just as the user is about to view results for the lookup.


Type: Function to add.
This method is only available for Updated Entities.

The argument is a function that will be run just before the search to provide results for a lookup occurs. You can use this handler to call one of the other lookup control functions and improve the results to be displayed in the lookup.


Next let’s build the handler. We’re building the filter query and add the filter to our control as such:

function addLookupFilter() {
    var myControl = Xrm.Page.getAttribute("control_name").getValue();

    if (myControl != null) {
        fetchXml = "<filter type=’and’><condition attribute=’customertypecode’ value=’1′ operator=’eq’/></filter>";

Now, it’s all in the filter, and the current example only looks for one specific Organization type. You can build that fetchXml filter as complex as needed, either by pulling if from an advanced find, creating it by hand, or using a 3rd party tool.


Images are a new feature of CRM 2013. We can now easily associate an image to a record. In 2011 we had to add images either as Web Resources and reference them, or create custom scripts to pull images associated to Notes and display them on the records. Now, by default, CRM adds the image fields to 24 out of the box entities, and enables them to 8 of them. They are, in no particular order:

  1. Account
  2. Contact
  3. Competitor
  4. Lead
  5. Product
  6. Published
  7. Resource
  8. System User

It is very easy though to enable these images on to our new custom entities. These are the steps to follow:

1. Create a new field of type Image. Be aware that only one field of type Image can be added to an entity.


2. Go to the entity’s General tab, and set Primary Image to the entity image field created.


3. Go into form customization, and in Form Properties check the box for “Show image in the form”


4. Navigate to the record, click on the image container, and associate an image. The images have to be less than 5Mb in size. The actual rendered image is 62×62 pixels on the entity form:


or 40×40 pixels for the user profile in the top-right:


Some limitations include the fact that location is fixed to top-left corner of the form, and there is no direct way to resize it.


Data Grid “+” does either Add New or Add Existing

So, hypothetical situation, I need a data grid on a custom entity (call it Group) to allow me to add existing related records of Users.


Followed the steps as such:

  1. Go to User, add a new lookup field Group, and make it Business Required
  2. Go to the Group custom entity and add a data grid to Users
  3. Save and publish all customizations.


Now, the interesting behavior is that, once you navigate to Group, and click on the “+” sign to add a reference to a system user, you get prompted directly to create a new user. But that’s not what I want. I just want to associate an existing user to the Group.

Turns out that it matters a lot how you define the group lookup on the User form. Here’s how it works:

If the lookup to Group is defined as Business Required on the User form, then in the Group form data grid the “+” sign will create a New User record.

On the other hand, if the lookup to Group is defined as either Business Recommended or Not Required, then in the Group form data grid the “+” sign will open up a lookup field, allowing you to reference an existing User.

Just something to keep in mind when working with relationships.


Recently I was trying to set-up a client’s Outlook to connect to a CRM 2013 instance. The user is in a new security role customized specifically for this group of users.

First hurdle encountered was clearly described as a permission issue:

“Principal user is missing prvReadUserSettings privilege.”


The fix for this is to go into the security role permissions, to the Business Management tab, and give permissions to Read to User Settings:


Amongst others, this will also fix the What’s New section on the Sales Activity Social Dashboard, from this:


to this:


Much better. But we’re still not done yet.

You still can’t connect your Outlook to CRM. The next failure return this message:

Error| Exception : Culture is not supported.

Now, that might easily send us in the wrong direction. The answer is actually really simple. All you need is, in the security group permissions, give Write to User Settings also.


Now it all works fine.


MVP Reconnect

Check out my course [Video]

Dynamics 365 Customer Engagement Administration

Dynamics 365 Customer Engagement Administration

Check out my course [Video]

Configuring and Extending Dynamics 365 Customer Engagement

Configuring and Extending Dynamics 365 Customer Engagement

Check out my course [Video]

Getting Started with Dynamics 365 Customer Engagement

Reviewed Book

Implementing Microsoft Dynamics 365 for Finance and Operations

Implementing Microsoft Dynamics 365 for Finance and Operations

Reviewed Book

Microsoft Dynamics 365 Extensions Cookbook

Microsoft Dynamics 365 Extensions Cookbook

Check out my Book

Microsoft Dynamics CRM 2016 Customization - Second Edition

Microsoft Dynamics CRM 2016 Customization - Second Edition

Check out my Book

Microsoft Dynamics CRM Customization Essentials

Microsoft Dynamics CRM Customization Essentials

Check out my Book

Reviewed Book

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 609 other followers

Follow Dynamics 365 Wizardry on