Controls (Client API reference)
Applies to Dynamics 365 (online), version 9.0
A control represents an HTML element present on the form. Some controls are bound to a specific attribute, whereas others may represent unbound controls such as an IFRAME, Web resource, or a sub grid that has been added to the form.
The control object provides methods to change the presentation or behavior of a control and identify the corresponding attribute. You access controls using one of the following collections:
- formContext.ui Section.controls
- formContext.data.entity Attribute.controls
The formContext.getControl method is a shortcut method to access formContext.ui.controls.get.
Controls are categorized by type. You can determine the type of a control by using the getControlType method. Certain control methods are only available for specific types of controls.
This topic provides information about the methods available per control type.
standard control type
These are the methods available for a Standard control.
The following methods for the Standard control are deprecated in this release: addOnKeyPress, fireOnKeyPress, and removeOnKeyPress.
iframe control type
These are the methods available for an IFRAME control.
kbsearch (Knowledge base search) control type
These are the methods available for knowledge base search control.
When the knowledge base search control is added to the social pane, the name of the control will be "searchwidgetcontrol_notescontrol". This name can’t be changed.
lookup control type
These are the methods available for a lookup control.
multiselectoptionset and optionset control types
Both multi-select option set and option set controls have the same set of methods available.
quickform control type
See formContext.ui.quickForms for information about methods supported for this control type.
subgrid control type
See Grids and subgrids for information methods supported for this control type.
timelinewall control type
The timeline control is a new control type introduced in Dynamics 365 (online), version 9.0 that presents the Posts, Activities, and Notes in a unified view. These are the methods available for this control type.
timer control type
These are the methods available for the timer control.
webresource control type
A web resource control has the same set of methods available as the iframe control. See iframe control type