Interface for a Lookup control.

See

StandardControl

Deprecated

Use LookupControl instead.

Hierarchy

Methods

  • Adds an additional custom filter to the lookup, with the "AND" filter operator. Can only be used within a "pre search" event handler

    Parameters

    • filter: string

      Specifies the filter, as a serialized FetchXML "filter" node.

    • Optional entityLogicalName: string

      (Optional) The logical name of the entity.

    Returns void

    See

    addPreSearch

    Remarks

    If entityLogicalName is not specified, the filter will be applied to all entities valid for the Lookup control.

    Example

    Example filter: <filter type="and">
    <condition attribute="address1_city" operator="eq" value="Redmond" />
    </filter>
  • Adds a custom view for the Lookup dialog.

    Parameters

    • viewId: string

      Unique identifier for the view, in Guid format.

    • entityName: string

      Name of the entity.

    • viewDisplayName: string

      Name of the view to display.

    • fetchXml: string

      The FetchXML query for the view's contents, serialized as a string.

    • layoutXml: string

      The Layout XML, serialized as a string.

    • isDefault: boolean

      true, to treat this view as default.

    Returns void

    Remarks

    Cannot be used on "Owner" Lookup controls. The viewId is never saved to CRM, but must be unique across available views. Generating a new value can be accomplished with a External Link: Guid generator.

    Example

    Example viewId value: "{00000000-0000-0000-0000-000000000001}"
    

    See

    External Link: Layout XML Reference

  • Displays an error or recommendation notification for a control, and lets you specify actions to execute based on the notification.

    Parameters

    Returns void

  • Adds an event handler to the "lookup tag click" event.

    Parameters

    Returns void

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

  • 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 the unique identifier of the default view.

    Returns string

    The default view, in Guid format.

    Example

    Example return: "{00000000-0000-0000-0000-000000000000}"
    
  • Gets a boolean value, indicating whether the control is disabled.

    Returns boolean

    true if it is disabled, otherwise false.

  • Gets the types of entities allowed in the lookup control.

    Returns string[]

  • 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 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 handler from the "lookup tag click" event.

    Parameters

    Returns void

  • Sets the Lookup's default view.

    Parameters

    • viewGuid: string

      Unique identifier for the view.

    Returns void

    Example

    Example viewGuid value: "{00000000-0000-0000-0000-000000000000}"
    
  • Sets the state of the control to either enabled, or disabled.

    Parameters

    • disabled: boolean

      true to disable, false to enable.

    Returns void

  • Sets the types of entities allowed in the lookup control.

    Parameters

    • entityLogicalNames: string[]

    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