Get the control object in Microsoft Dynamics CRM

In Dynamics CRM, formContext.getControl() function is used to get a reference to a specific control on a form.

This function takes a single parameter, which is the name of the control. This name is usually the schema name of the attribute that the control is bound to.

Example:

how to use the formContext.getControl() function to get a reference to a control on a form:

var control = formContext.getControl(“new_name”);

if (control) {
  // Do something with the control

}

In this example, the getControl() function is used to get a reference to a control with the schema name “new_name”. If the control is found, the function returns a reference to the control object, which can be used to interact with the control, such as getting or setting its value.


Posted

in

by

Tags: