Class OptionsetField<Options>

Interface an OptionSet attribute.

Type Parameters

  • Options extends OptionValues

Hierarchy

Implements

Constructors

Properties

Name: string
Option: Options
_attribute: Xrm.Attributes.OptionSetAttribute<number>

Accessors

  • get Value(): number
  • Gets the value.

    Returns number

    The value.

  • set Value(value): void
  • Parameters

    • value: number | keyof Options

    Returns void

Methods

  • Adds an option.

    Parameters

    • values: number[]

      an array with the option values to add

    • Optional index: number

      (Optional) zero-based index of the option.

    Returns OptionsetField<Options>

    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

    • uniqueId: string

      (Optional) Unique identifier.

    Returns OptionsetField<Options>

    true if it succeeds, false if it fails.

    Remarks

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

  • Sets a control-local notification message.

    Parameters

    • message: string

      The message.

    • uniqueId: string

      Unique identifier.

    Returns OptionsetField<Options>

    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 value.

    Parameters

    • value: any

      The value.

    Returns void

    Remarks

    The getOptions() method returns option values as strings. You must use parseInt to convert them to numbers before you can use those values to set the value of an OptionSet attribute. Attributes on Quick Create Forms will not save values set with this method.

Generated using TypeDoc