Configure pre-entry fields
  • 23 Jan 2024
  • 4 Minutes to read
  • Dark
    Light

Configure pre-entry fields

  • Dark
    Light

Article summary

You can configure pre-entry fields that require users to enter a value before displaying the product records that they can add to their deal. There are two use cases for pre-entry fields:

  • A line that a user creates must contain the same value in a specific field. For example, that field is Shipping Warehouse. There are many possible values for this field in the system, but the accounts that each user services typically share the same shipping warehouse. By setting up Shipping Warehouse as a pre-selection field, users can enter their usual shipping warehouse before any lines appear in the Add Lines list. Subsequently, all added lines will automatically derive their Shipping Warehouse value from the user's pre-selection entry.
  • When adding lines to the agreement, a user can select only from warehouses assigned to that account. In this case, the user can add only those product records that are conditioned by the value in a pre-selection field.
    • This use case will often use the ability to dynamically filter the available values for a pre-selection field by using Filtering Formula Field on the pre-entry field or the Pre-Entry Field Options Filterer Apex hook.
    • In addition, this use case will always use the Pre-Entry Fields Configurer Apex hook that filters out product records from the Add Lines list based on the value that the user enters.

Prerequisites

Before configuring this feature, make sure that the following fields are visible and can be edited:

  • Pre-entry Field object:
    • Field Name
    • Salesforce Field
    • Controlling Field
    • Filtering Formula Field
    • Field Order
    • Required
    • Allow Multi-Select
    • Default Value
    • Sort Condition
    • Search Configuration
  • Pre-Entry Field Options Filterer on Product Selector Configuration object.

If the fields are not visible or can't be edited, confirm that they have been added to the object's page layout and are visible in the user's profile. For detailed instructions on how to add fields and check for visibility, refer to Make fields visible or editable.

Define basic pre-entry fields

The user must specify values in all pre-entry fields before product lines appear. Depending on the Salesforce field type, this might require users to manually enter values or select values from a dropdown list.

You can configure a controlling field for some or all pre-entry fields. This effectively locks the pre-entry field until after a value has been entered into the controlling field. For example, you might want users to first enter a calendar date value before they can interact with other pre-entry fields.

  1. From the Lightning App Launcher, go to the appropriate Product Selector Configuration.
  2. On the Related tab, in the Pre-entry Fields section, select New.
  3. In the New Products Search Filter dialog, specify values:
    • Field Name—Specify the display name of the field.

    • Salesforce Field—Specify the API name of the field in the zpl_ContractLineItem_c or zpl_PriceLookupLineItem_c object, as appropriate.

    • Controlling Field—Optionally specify a different pre-entry field. This effectively locks the pre-entry field until after a value has been entered into the controlling field.

      Notes
      • The Controlling Field can be specified only for pre-entry fields of PICKLIST or REFERENCE field types​.
      • The Controlling Field is a reference to another pre-entry field.
      • A user must enter a value in Controlling Field before they enter a value in the field it controls.
      • Do not configure a pre-entry field that cross-references a Controlling Field. This prevents users from entering a value in any one of those fields.
    • Filtering Formula Field—Optionally specify the API Name of the Salesforce Boolean field that will filter options included in the dropdown list. The field should exist on the object that is referenced by the field specified in Salesforce Field. Records that have that field evaluated to TRUE are included in the dropdown list. Use this only for pre-entry fields of REFERENCE type.

    • Field Order—Specify an integer specifying the order in which this pre-entry field appears in the Filter panel, starting from 1 for the top-most pre-entry field.

    • Required—Do not select. The current implementation supports only required pre-entry fields.

    • Allow Multi-Select—Select to enable users to select more than one option for this pre-entry field. This checkbox can be selected only for the pre-entry fields of PICKLIST or REFERENCE types.

    • Default Value—Optionally specify a value to appear by default.

      Note

      Default Value has a validation rule that the specified field must be of PICKLIST or REFERENCE types (field, specified in Salesforce Field):

      • For the PICKLIST type, specify the Label of the picklist option available for that field.
      • For the LOOKUP type, specify the Name field of the referenced object.
    • Sort Condition—Optionally specify the condition for the sorting of records in the pre-entry field dropdown list.

      Notes
      • The field accepts pairs of fieldName direction. For example, Name ASC.
      • The field supports the ASC and DESC ordering. The default ordering is ASC.
      • The fieldName value must be a valid field on the linked object.
      • For multi-column sorting, each pair should be specified on a separate line.
    • Search Configuration—Optionally select the Search Configuration to use. If selected, the search box will appear for the pre-entry field on the Add Lines to help you search for the values in the dropdown list. Use only for pre-entry fields of PICKLIST or REFERENCE type.

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