Selector: Configuring a Link

A selector control can display a value as a link to the record whose identifier is displayed in the selector control. The link is configured differently depending on the location of the selector control:

  • In a fieldset, enable the link by specifying config-allow-edit.bind="true" in the field tag, as shown in the following example.
    <field name="CustomerID" config-allow-edit.bind="true"></field>
    <field name="CustomerLocationID" config-allow-edit.bind="true"></field>
    <field name="ContactID" config-allow-edit.bind="true"></field>

    The code above displays links, as shown in the following screenshot.

    Figure 1. Links in the selector controls


  • In a grid, a link is displayed by default.

    To disable the link, specify hideViewLink: true in the columnConfig decorator in TypeScript, as shown in the following example.

    @columnConfig({ hideViewLink: true })
    BranchID: PXFieldState<PXFieldOptions.CommitChanges>;

    The code above removes the link from the Branch column, as shown in the following screenshot.

    Figure 2. Link in the grid