Interface for an OptionSet control.

Hierarchy

Methods

  • Adds an option.

    Parameters

    • option: Xrm.OptionSetValue

      The option.

    • Optional index: number

      (Optional) zero-based index of the option.

    Returns void

    Remarks

    This method does not check that the values within the options you add are valid. If index is not provided, the new option will be added to the end of the list.

  • Clears the notification identified by uniqueId.

    Parameters

    • Optional uniqueId: string

      (Optional) Unique identifier.

    Returns boolean

    true if it succeeds, false if it fails.

    Remarks

    If the uniqueId parameter is not used, the current notification shown will be removed.

  • Clears all options.

    Returns void

  • Gets the controls type.

    Returns string

    The control type.

    Values returned are:

    • standard
    • iframe
    • lookup
    • optionset
    • subgrid
    • webresource
    • notes
    • timercontrol
    • kbsearch
    • quickform (see ui.QuickForm)
    • customcontrol: . (A custom control for mobile phone and tablet clients).
    • customsubgrid: . (A custom dataset control for mobile phone and tablet clients).
  • Gets a boolean value, indicating whether the control is disabled.

    Returns boolean

    true if it is disabled, otherwise false.

  • Gets the label.

    Returns string

    The label.

  • Gets the name of the control on the form.

    Returns string

    The name of the control.

    Remarks

    The name assigned to a control is not determined until the form loads. Changes to the form may change the name assigned to a given control. When you use the control getName method the name of the first control will be the same as the name of the attribute. The second instance of a control for that attribute will be "1". The pattern +N will continue for each additional control added to the form for a specific attribute. When a form displays a business process flow control in the header, additional controls will be added for each attribute that is displayed in the business process flow. These controls have a unique name like the following: header_process_.

  • Returns an array of option objects representing valid options available for a control, including a blank option and excluding any options that have been removed from the control using removeOption.

    Returns Xrm.OptionSetValue[]

    The array of option objects representing valid options where each option object has the following attributes: text: String. Label of the option. value: Number. Enumeration value of the option.

  • Returns a dictionary of the output properties of the control.

    Returns {
        [index: string]: FieldControlOutput;
    }

    A dictionary for the output parameters from the control. For a PCF control this is of the pattern .fieldControl., e.g. telephone1.fieldControl.isValid

  • Gets the visibility state.

    Returns boolean

    true if the tab is visible, otherwise false.

  • Removes the option matching the value.

    Parameters

    • value: number

      The value.

    Returns void

  • Sets the state of the control to either enabled, or disabled.

    Parameters

    • disabled: boolean

      true to disable, false to enable.

    Returns void

  • Sets focus on the element.

    Returns void

  • Sets the label.

    Parameters

    • label: string

      The label.

    Returns void

  • Sets a control-local notification message.

    Parameters

    • message: string

      The message.

    • uniqueId: string

      Unique identifier.

    Returns boolean

    true if it succeeds, false if it fails.

    Remarks

    When this method is used on Microsoft Dynamics CRM for tablets a red "X" icon appears next to the control. Tapping on the icon will display the message.

  • Sets the visibility state.

    Parameters

    • visible: boolean

      true to show, false to hide.

    Returns void

Generated using TypeDoc