Re Arrange TabIndex from Left to Right in CRM forms

Chandana's CRM Blog

Generally, by default CRM provides tab order from top to bottom. But sometimes depending on the requirement or for professional look and feel we come across Left to Right order in CRM forms.

To change the default tab order use the following lines of code

function tabOrderLefttoRight() {

for (var i = 0; i < Xrm.Page.ui.controls.getLength() ; i++) {

var element = Xrm.Page.ui.controls.get(i);

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);




The above code runs well on IE 11 and for Chrome for CRM 2013 environment. For 2011 we need to get the length of the controls used in the form using crmForm. As it unsupported customization going forward we use Xrm attributes. Calll the above function on…

View original post 26 more words

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s