var fieldList = new Array();
var tab = Xrm.Page.ui.tabs.get(tabId);
tab.sections.forEach(function (section, sectionIndex)
section.controls.forEach(function (control, controlIndex)
var attribute = control.getAttribute();
if (attribute != null)
Add this function to one of the web resources which has been linked to an Entity Form, and you can use it like this:
var fieldList = getFieldListFromTab(0);
You can pass in the tab number, which is zero-based, or pass in the tab name.
In the example above, we are retrieving all of the fields in the first tab, then displaying the number of field names added to the array ( the length property ).
You just finished reading Retrieve all of the field names in a Tab! Consider leaving a comment!
Follow me on Twitter @mitchmilam. Read my new book: Dynamics Deep Dive: Security
Other Microsoft Sites
I'm a Customer
I'm a Partner
Follow Microsoft Dynamics