Partager via


OnLookup (Fields) Trigger

Causes the system to display a lookup page.

Applies To

Fields

Remarks

There are three lookup options:

  1. Default Lookup - The lookup into the table is performed without applying filters or other special parameters.

  2. Field Lookup - You can use this trigger to define a field lookup that will be used in place of the default lookup.

  3. Text box Lookup - You can use the OnLookup (Page fields) Trigger to define a lookup based on the value of a text box. This value will be used in place of the default lookup or the field lookup.

    When using this trigger, follow this approach:

  • Use the field value to determine what filters or other parameters to apply.

  • Run the lookup page as a modal page.

  • Transfer the value the user selects back to the field when the user chooses OK.

    If an error occurs in the trigger code, the lookup page is closed.

Important

On non-editable fields in the Microsoft Dynamics NAV Windows client, the field lookup action is rendered as a hyperlink.

On a non-editable fields in the Microsoft Dynamics NAV Web client, the OnLookup trigger is not invoked. This means, the lookup will not render in a Repeater control in view mode. In this case, you can use the OnDrillDown Trigger instead.

See Also

OnLookup (Page fields) Trigger