Configure Search Bar for CDT
  • 21 Mar 2024
  • 2 Minutes to read
  • Dark
    Light

Configure Search Bar for CDT

  • Dark
    Light

Article summary

Define and configure a header-level Search bar for the CDT list of records.

To define a Search Bar configuration

  1. In the App Launcher, search for the Search Bar Configurations app, and select New.
  2. In the New Search Bar Configuration dialog, enter information or make selections:
    • Search Bar Configuration Name—Enter a descriptive name for the configuration.
    • Type of Search—Enter the type of search operator this configuration should use, such as Contains or Starts with.
    • sObject Name—Enter the API name of the Salesforce object that contains the data you'll be searching through in this configuration. This should be the same name that you have specified in the New Data Table Configuration dialog.
    • Select Save.
  3. Go to the Product Selector Configuration > Related > Search Fields, and select New.
  4. In the New Search Field dialog, enter information or make selections:
    • Name—Enter the name of the search field.
    • Column Label—Enter a user-friendly label that will appear in the rendered Search bar.
    • Field Name of Column (for SOQL query)—Enter the API name of a field from the sObjectName. For example, AccountNumber for a standard Salesforce field, or zpf__SLAExpirationDate__c for a custom field.
      To check the exact value to specify in the Field Name of Column (for SOQL query) field:
      • Go to the Object Manager, and select the appropriate sObject.
      • Select Fields & Relationships, and check the Field Name column value. This is the name of the field to be used in the Field Name of Column (for SOQL queries).
      • Make sure that the field you choose is of type Text. Otherwise, you will get an error when creating the configuration.
      • You can add as many fields as you need.
    • Select Save.
  5. Select the Details tab, and assign the default search field in the Default Displayed Search Field:
    • Select the pencil-shaped icon next to Default Displayed Search Field.
    • Enter the name of the field (it is the same name you have already entered in the Related tab, in the Column Label field). You can select Show All Results....
    • From the dropdown, select the field you want to display as a default. The ALL option will be automatically available if there are more than two search fields configured for the Search bar. You can select ALL as a default search value.
    • Select Save.

To add the Search Bar Configuration to the Configurable Data Table component

  1. From the App Launcher, select Data Table Configurations, then select the configuration you defined.
  2. From the Search Bar Configuration dropdown, select the configuration you defined.
  3. Select Save.

Was this article helpful?

Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.