jump to navigation

Microsoft Dynamics CRM 4.0 disabling all fields on a tab July 14, 2010

Posted by jarrettexpertcrm in Microsoft CRM General.
Tags: , , , , , , , , , ,
add a comment

Ever need to disable all fields on a tab not just one or two? Want to know a quick way of doing it instead of crmForm.all.field.disabled = true; for every field? Of coarse you have or you wouldn’t be here :).

Onload

function disableTab(tabIndex)
{
var tab = document.all[“tab” + tabIndex];
for (var i = 0; i < tab.all.length; i++) {
if (tab.all[i].Disabled !== undefined) {
tab.all[i].Disabled = true;
}
}
}
disableTab(2);

Just replace the “2” inĀ disableTab(2) with the proper tab number

Hope this helps!

For more information about Dynamics Four or to contact us please visitĀ http://dynamics4.com