Left to Right tabbing in MSCRM 2013

The default tab behaviour in Microsoft Dynamics CRM is top to bottom, rather than left to right.

The following will change the tab order from left to right on your form in IE, Firefox and Chrome. However, please note that it is unsupported.

function TabOrderLefttoRight() {
for (var i = 0; i < Xrm.Page.ui.controls.getLength() ; i++) {
var control = Xrm.Page.ui.controls.get(i);
var element = document.getElementById(control.getName());

if (element.tabIndex && element.tabIndex != "0") {
if (element.className == 'ms-crm-Hidden-NoBehavior')
if (element.tagName == 'A') {
if (element.className != 'ms-crm-InlineTabHeaderText')
element.tabIndex = 1000 + (i * 10);


Create Deployment Administrator via Database

Recently I had to make some changes to a CRM server and needed to run the Deployment Manager tool. However, I had performed the installation with an account that had elevated security rights to my own one. In such a situation, proper protocol and best-practice administration dictates that one asks the appropriate individual to simply create a new Deployment Administrator. However, if you wanted to circumvent the rules, here’s how:

1. Open your user record in Microsoft CRM and copy your user id (Ctrl + N),

2. Open Microsoft SQL Server Management Studio, right click on the MSCRM_CONFIG database and select ‘New Query’,

3. Run the following query to work out your Id and UserId from the SystemUserOrganisations table:

select Id, UserId
from SystemUserOrganizations
where CrmUserId = 'f01af5f8-959e-de11-9f0f-00188bfcb0e0' // replace with your CrmUserId

4. Now use the returned Id and UserId and insert into the SystemUserRoles table:

insert into SystemUserRoles
('F51AF5F8-959E-DE11-9F0F-00188BFCB0E0' // replace with your ID returned above
,'F31AF5F8-959E-DE11-9F0F-00188BFCB0E0' // replace with your UserId returned above

You should be able to access the Deployment Manager now.

Modifying Views outside Microsoft CRM

Last week a colleague tried to create a view in Microsoft CRM to show Accounts that were in an Inactive state and had a merged Master contact record. Microsoft CRM doesn’t allow the MasterID field to be queried or returned in Advanced Find nor does it allow it to be changed (by changing the ‘Searchable’ option on the attribute).

The quickest and dirtiest way around it is to modify the view in the table itself. Since all user and system views are simply FetchXml, we’re able to create views that the AF tool won’t let us create.

I used his view as the starting point:

I Searched and found the query in the UserQueryBase table and copied out the FetchXml and LayoutXml columns.

I modified the FetchXml as follows (the additions in bold and italics):

And I modified the LayoutXml as follows (the additions in bold and italics):

I then saved them back to the SQL table and re-ran the query in CRM:

Needless to say, this is an unsupported customisation change to Microsoft CRM- after doing the above, you’ll see the following in Advanced Find: