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

continue;

if (element.tagName == ‘A’) {

if (element.className != ‘ms-crm-InlineTabHeaderText’)

continue;

}

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

Advertisements

About Debajit
I am a Dynamics CRM Most Valuable Professional (MVP) with 10 years of experience in Microsoft .NET Technologies and 7 years of dedicated experience in Microsoft Dynamics CRM. I have worked with companies like Microsoft, SanDisk, PwC, TMF Group and have extensive experience of implementing complex CRM solutions from both offshore and client side. Currently the face of XrmForYou.com with significant experience in delivering corporate training on Dynamics CRM and have already delivered multiple projects to client through XrmForYou.com Author of multiple tools on codeplex including the 'Role Based Views' and 'CRM-Sharepoint Metadata manager & Attachment Extractor' which are available for commercial use under XrmForYou.com For consulting/ training, drop me a note at info@xrmforyou.com or visit our website www.xrmforyou.com

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s

%d bloggers like this: