If you’ve recently upgraded to CRM 2013 SP1 and you’ve applied the product update for cases, you might be experiencing an issue where outlook users are unable to track certain emails in CRM. They receive an error: You do not have permissions to access these records. Contact your Microsoft Dynamics CRM administrator. Item Name = <email subject>.

After a bit of digging, we found that the missing privilege was Read access to the Case Creation Rule entity, which is a new entity added with the latest product updates. Because we already had existing security roles, these did not include any access to this new entity.

If we give User level Read access to the Case Creation Rule entity through our security roles, this error will no longer appear.

This error only seems to occur when the email being tracked is from an unresolved sender, which doesn’t match any existing CRM records.

Recently we noticed a problem where some users were not seeing that a field was required in Dynamics CRM 2013. The field still behaved the same, and would display a notification if the field was left blank, however it simply would not show the red asterisk beside the field letting the user know the field is required.

There were also some other unusual looking things, such as boxes showing up around the social pane headings etc. This was happening on all browsers, but only for certain users.

As it turns out, there is a setting in Personal Options to ‘Enable high contrast’ which was doing this. It appears that the setting was on by default for certain users, possibly as a result of their browser or OS settings. The solution was to simply uncheck this option for each user.

You may have to clear the user’s browser cache to see the changes. Once that’s done though you should be able to refresh your form and see it normally again.

This issue occurs in both CRM 2013 and also CRM 2015.

Business Rules were introduced in CRM 2013, which allowed customizers to create simple conditions to manipulate the form without needing to write any JavaScript. The only limitation of this was that to create If-Then-Else style conditions we had to create multiple business rules to accommodate each possible scenario.

Dynamics CRM 2015 now introduces the ability to add additional conditions into a single business rule, allowing us to maintain all the logic for a single rule in one place, rather than across several business rules.

You can see we now have a button at the bottom ‘Add Else’. If we click this a new CONDITION/ACTION block will be added.

We can leave the CONDITION blank, and this will act as an ELSE, meaning if the first condition is not met, this action will fire no matter what. Otherwise if we specify a condition, this will become an ELSE IF, and we will have the option to add an additional ELSE below this.

We can repeat this as many times as we need to, creating as many ELSE IF’s as is required for this rule. I’ve added a few more conditions for if the Rating is ‘Cold’ to set Probability to 20, and finally an ‘ELSE’ which sets it to 0 if there is no Rating set for some reason.

Once we’re done we can activate the rule and test it out.

When creating a new Opportunity, straight away we can see the Probability is set to 60 since the Rating is Warm by default.

If we change the Rating to Hot or Cold the Probability will be updated based on our rules.

Dynamics CRM 2015 adds a new feature to Business Process Flows that were introduced in CRM 2013, which now allows us to branch the process in a different direction based on some condition. Similar to in a workflow or dialog where we might have several different paths that can be taken based on the type of record etc.

In CRM 2013 business process flows only had 1 branch that they could follow. If you wanted multiple branches you’d need to create multiple process flows and have the user switch between them. This has become much easier now, as we can simply select to add a branch into the process.

When we click to add a branch, we are able to specify a condition which would take a user down this branch.

We can also add additional Add/Or conditions to this branch by clicking the ‘plus’ button just below the condition. For example we could do: Industry = Accounting AND No. of Employees > 100.

At the time of writing this blog (which is based on the beta release) it seems like we can only specify one type of grouping for each branch, e.g. ‘this OR this OR this’, or ‘this AND this AND this’, but not this AND this OR this. If we have 3 or more conditions and change one of them from AND to OR or vice versa it will change all the other conditions for this branch as well.

Once the condition is created, we can add a stage within the branch by clicking ‘Insert Stage’ below the condition.

We can add additional branches to our existing branch by clicking ‘Add branch’ above the entire condition (the same way we added the first branch), which will by default add an ‘Else’ condition, meaning if the first branch’s condition isn’t met it will always fall back onto the ‘Else’ branch. We can also convert the ‘Else’ to an ‘Else If’ which allows us to specify another condition if the first condition isn’t met. We can add as many ‘Else If’ conditions as we need to which will create multiple possible branches from the same point.

Once we’ve completed our process flow with branches it’s time to test it out. The process flow I’ve created runs on Account, and has 2 branches. It starts with identifying the industry, number of employees, and annual revenue. Depending on these values, the process should either go into the ‘Develop’ and ‘Propose’ stages, or into the ‘Research’ stage.

When we create a new Account, since there are no values entered yet, the process is shown with the Research stage.

If we enter in some values the process flow will update automatically.

When we go to the ‘Next Stage’, we will be moved down the branch that meets our conditions. Once moved into the next stage, changing the values that took us down this branch will not change the process. For example, once in the Develop phase, if the Annual Revenue is changed we will remain on the current branch.

Finding records in CRM has never been easier than it is now in CRM 2015. Not only has Microsoft added global search into the global nav so we can search for a single term across several entities from anywhere in the system, but they’ve also taken on feedback from the community and have added Advanced Find into the global nav as well.

I had already released a solution for CRM 2013 which adds Advanced Find to the Global Nav (which still works in 2015 if you’re upgrading).

The new button has been added to the right of the ‘Search Entities’ box, beside our user/org name. The icon is a little bit confusing at the moment, as it’s not using the classic advanced find icon everyone is used to with previous versions of CRM – however since I’m only using the ‘beta’ release, the icon may be updated for the full release.

When we click on this button from anywhere in CRM that has a global nav bar, an advanced find window will be opened. If we’re on a view for an entity, the advanced find window will automatically open up to that entity and the view we’re on. If we’re on a form the advanced find window will open the ‘new query’ window for the current entity, however the behaviour is a little bit different for forms.

When we click the advanced find button from a view, a dashboard, or another area of the sitemap, the advanced find window that opens is opened in a new window which can be minimized or resized, and depending on your browser settings can open in a new tab instead of a popup. This is great as it means we can open advanced find and continue doing what we were doing with advanced find still open in the background.

You can see in the image above that the advanced find window that opens from a view has the minimize and maximize buttons available.

When we click the advanced find button from a form however, it is opened in a dialog box which cannot be minimized, and cannot be opened in a new tab. This means we cannot keep the advanced find window open while continuing to use the rest of the system. Hopefully this is only an issue for the beta release.

In the image above you can see that the advanced find window opened from a form does not have the minimize or maximize buttons, and we cannot click back onto our other window without closing advanced find.

Advanced Find has also now been removed from all command bars, as it is no longer needed.

Overall I think this feature is very cool and I’m sure everyone will be glad to have this available. Hopefully it can be made a little bit easier to use in the full release, as this blog post is based on the beta.

In Dynamics CRM 2013 we can create business rules for different entities from within a solution, using the new ‘Business Rules’ node under each entity. The business rules for an entity will be automatically deployed with the entity, just like with views, forms, and fields etc. From the Business Rules node, we can see all the business rules that have been created for any particular entity.

While this is good for when we need to see all the business rules on an entity, it does not allow us to pull up a list of business rules across the whole system. Some times after deploying a solution we need to check the business rules to make sure they’re activated, or if there are any errors, and we don’t want to have to go through each entity and check these.

Since it’s pretty obvious Business Rules are just workflows under the hood, I pulled up an advanced find and had a look at Processes, which has filter criteria to only include Processes where the Category = Workflow, Dialog, or Business Process Flow. Looking at the other Categories available, we also have Action, and PBL (this of course means Portable Business Logic). We can simply edit the criteria, or even better create a new personal view for Processes where Category = PBL to pull up a list of all business rules in our system.

By default the view will show us the name of the Business Rule, as well as the Entity it’s on, and the Status it’s currently in.

From these results we can easily get a global view of all business rules in the system, and we can even Activate and Deactivate the business rules from here without having to go through the solution and entity. This is great for when we’ve deployed a solution containing business rules and just need to quickly check that all business rules have been deployed correctly.

With the introduction of rollup 2, it seems that we can also open the Business Rules directly from this view, so that we can make changes before activating them (previously we would receive an error when attempting to open them). If you need to create new Business Rules however, you still need to go through the solution.

Rollup 3 for Dynamics CRM 2013 is now available to download, and fixes many of the issues I’ve experienced with CRM 2013.

Here are some of the main bug fixes which I’m happy to see:

Unresolved email sender is not displayed correctly on Email form

Unresolved recipients on an email used to disappear when you load the form (even though they are still physically there). They now display correctly when loading the form.

Users attempting to add multiple records to a N:N relationship in Microsoft Dynamics CRM 2013 will experience the following error dialog even though the associations are completed: Duplicate Record: A record with these values already exists. A duplicate record cannot be created. Select one or more unique values and try again.

In some cases when we associate records through a N:N it would error stating that there were duplicates, even though there were not. The records would still be associated, and the error could be ignored.

Duplicate records are created if Save or Save and Close is pressed multiple times

This one has been around since the Beta days of CRM 2013, despite being ‘fixed’ in rollup 1, it still happened randomly some times. Hopefully this is fixed once and for all now.

Script error occurs when selecting a party type field in a Business Rule action

This was only a problem if you wanted to set the default value of a party list field, such as the ‘Call To’ or ‘Call From’ on a Phone Call. When you select one of these fields from the Action, it would give an ‘Unsupported Type’ error. The only workaround was to use JavaScript instead.

JavaScript methods will not trigger when a business required field is changed to be blank

This was an annoying one, but ultimately didn’t affect functionality, only user experience – since it’s required the form cannot be saved without a value, so as soon as a value is entered the onchange will fire again.

Custom plugin Exception is not thrown in UI as expected

Some times when plugins throw an exception you would only see the exception message in the bottom corner by the save button, but the actual message box would not pop up so it wasn’t always obvious what’s happened.

SDK- preventDefault is not working to stop deactivation from Account record

Another annoying one – if you had custom validation running on save of a record you could bypass the validation by clicking deactivate, which still performs a save. The only way around this was to also have a plugin performing server-side validation.

In CRM 2013, there was a change to allow users who have Impersonation (actonbehalf) privileges to activate and deactivate the workflows. This also allows users with the appropriate permissions to activate and deactivate workflow owned by other users in the UI. When you do this, it creates a new line in the WorkflowBase making the user that published this workflow the owner. If the workflow is set to the scope of a User, this workflow will only fire for the ModifiedBy user (the user that published this.)

One of the new features I recently wrote about – I haven’t come across this issue personally but it’s good to know it’s fixed, as this could cause major headaches.

Exporting Application ribbon contains duplicate values in XML

This is probably the most annoying bug I’ve ever dealt with. I spent a lot of time investigating what I had done wrong (thankfully nothing as it turns out). The issue we faced was around the custom hide action on the global ‘Connect’ button, which would create 2 hide actions in the XML and cause a solution import to fail.

Activity Types change when importing Solutions. As a result a view on the Activity entity that references the custom activity entity stops working. Warning message on the filter: This condition had one or more list values that no longer exist in the system.

If you have custom activity entities and you create a view of activities where the activitytypecode equals the custom entity, the view will be invalid after a deployment as the entity type codes of the activity entity may have changed, meaning the optionset value has also changed. The workaround for this was to either do a join on the actual activity, or to use ‘not in’ on all other activity types. Happy that this is fixed.

Untracking an email you do not own results in the email being deleted from CRM

This one I raised – woohoo! Instead of simply ‘untracking’ the email like it does if you own it, the only option would be to delete the email when owned by someone else. If you don’t have access to delete other users activities, you were unable to untrack it.

Removing / adding any field to the form after enabling the option “Automatically expand to use available space” causes the sub grid to shrink or resize to much smaller in size.

This one’s been around for a while. Whenever ‘auto expand’ is used, it would cause additional blank rows to be inserted after the field/subgrid. Pretty much the only workaround was to not auto expand.

For a complete list of fixes, check out the KB Article.

Previously I’ve been posting about how to recreate CRM functionality using browser bookmarkets. These have included useful functions like opening advanced find, or publishing customizations. In this blog post I’m going to go one step further and show how we can completely disable ALL client side validation on a form so that we can make changes to a form without worrying about field requirement levels, visibility, business rules, or JavaScript.

What I’m about to show is intended for testing purposes only, and should not be used in any production environments – otherwise you might end up with dirty data in your system. So use it cautiously, and use it wisely!

What it does:

  • Makes all required fields not required.
  • Makes all hidden fields visible.
  • Enables all disabled fields.
  • Makes all hidden tabs visible.
  • Makes all hidden sections visible.
  • Expands all collapsed tabs.
  • Clears field notifications on all fields.
  • Prevents JavaScript from firing on save.
  • Allows editing of inactive records.

One click of this button and you instantly have edit access to every field added to your form. This is extremely useful when you have JavaScript or plugins setting or relying on hidden fields on your form, and you need to quickly get in and see or modify those fields.

It’s also useful if you need to change a value on a form without entering in all the required fields – particularly as an admin when you need to fix up 1 or 2 fields on an existing record without filling out the rest of the required fields.

I’ve set up a form as an example below.

You can see we have most fields disabled. What you can’t see are the hidden fields and sections. Also when we try to save the form, our CRM Admin has added some “secure” JavaScript to prevent us from saving the form:

One click of our magic ‘God Mode’ button, and voila!

As you can see, literally every field is now unlocked, and not required. We can also see the ‘Company’ field in the second column which was previously hidden, the entire ‘Hidden’ tab is now visible, and we can edit any of the values (with the exception of Status, Created On, and Created By which can be changed but do not save to the database). We can also now save the form and bypass that pesky on save validation, and even clear the value of required fields.

Further down what you can’t see in the screenshot is that our Details tab has now been expanded as well. This means if we need to find a field we can Ctrl + F and quickly find what we’re looking for even if it was in a collapsed tab.

One other unexpected feature of this button is that we can also open an inactive record, turn on God Mode, and then change any of the ‘disabled’ fields. We can then simply navigate away from the record and the changes will be saved to the inactive record! (Only works with autosave enabled, or if you have rollup 1 or lower, and doesn’t work on activity entities).

Any user can set up this button for their own personal use, and it can be used with any CRM 2013 system, on any modern entity, and you don’t need any additional CRM security roles/privileges. To configure the bookmarklet, simply create a new bookmark, then edit the properties and set the URL to the following script:

javascript:var form=$("iframe").filter(function(){return $(this).css("visibility")=="visible"})[0].contentWindow;try{form.Mscrm.InlineEditDataService.get_dataService().validateAndFireSaveEvents=function(){return new Mscrm.SaveResponse(5,"")}}catch(e){}var attrs=form.Xrm.Page.data.entity.attributes.get();for(var i in attrs){attrs[i].setRequiredLevel("none")}var contrs=form.Xrm.Page.ui.controls.get();for(var i in contrs){try{contrs[i].setVisible(true);contrs[i].setDisabled(false);contrs[i].clearNotification()}catch(e){}}var tabs=form.Xrm.Page.ui.tabs.get();for(var i in tabs){tabs[i].setVisible(true);tabs[i].setDisplayState("expanded");var sects=tabs[i].sections.get();for(var i in sects){sects[i].setVisible(true)}}


If you’re a CRM admin/developer reading this, you probably want to think about what validation you’re doing on the client side and consider moving anything critically important into server side validation.

In Dynamics CRM 2013, when auto save is enabled, any changes to a record will be saved automatically when you close the record. In some cases we need to change data on a record to test functionality, and so we don’t always want those changes to be saved.

I’ve created a browser bookmarklet which will disable auto save for the record you have open, so that if you ever need to enter some test data into a record, you can simply click the bookmark which will prevent the system from automatically saving the form every 30 seconds, and also when you close the record or navigate away.

What the script does is it attaches an onsave event which checks the save mode, and cancels the save event for anything other than a physical ‘Save’, which can only be triggered by the little save icon in the bottom right corner (or my save bookmarklet). Any other type of save, including auto save and save and close, will be prevented. When you close the record or navigate away with unsaved changes, you will be prompted that there are unsaved changes just like it would if auto save was disabled for the organisation.

As you can see above, I’ve clicked the ‘Disable Auto Save’ bookmarklet, then made some changes to the Account Name, and when we navigate away we’re prompted that changes have not been saved. We can then simply click ‘Ok’ to close the form without saving the changes. The next time we open the record, or when we open any other record, auto save will be enabled again until. This allows us to turn off auto save only when required.

The script to use for this bookmark is as follows:

javascript: var frame = $("iframe").filter(function () { return ($(this).css('visibility') == 'visible') }); frame[0].contentWindow.Xrm.Page.data.entity.addOnSave(function(context){ if (context.getEventArgs().getSaveMode() != 1) { context.getEventArgs().preventDefault(); } });

In Dynamics CRM 2013 Customizers and Admins no longer have the ‘Customize’ tab on records anymore, which I often found useful for when we need to quickly get in and customize an entity, and then once done come back to the record and publish customizations.

To make things a little easier again, I’ve added these buttons back as browser bookmarklets. This will allow us to quickly and easily launch into the default solution, and automatically navigate us to the entity we’re on. We can also use this from other areas of the system, including views and dashboards, allowing us to jump straight into the customizations area without having to navigate through settings and losing our place in CRM.

I’ve also added a Publish button which can be used from anywhere in the system, including inside a solution and on a form. This will publish all customizations, and will be useful in times where there is no publish button available, for example when you edit a form and ‘Save & Close’ – you can now simply click the Publish bookmarklet to publish those changes instead of having to reopen the form or solution to publish.

The scripts to use for both of these bookmarks are as follows:


javascript: var frame = $("iframe").filter(function () { return ($(this).css('visibility') == 'visible') }); var form = frame[0].contentWindow; try { var etc = form.Xrm.Page.context.getQueryStringParameters().etc; } catch(e) {} form.Mscrm.RibbonActions.openEntityEditor(etc);



javascript: var frame = $("iframe").filter(function () { return ($(this).css('visibility') == 'visible') }); frame[0].contentWindow.Mscrm.FormEditor.PublishAll();