For the managed package runtime, enable users to select from a dropdown by adding a Select element to your Omniscript. Users can enter text to filter the options. Omnistudio pulls the options from an Apex class and method or from a Salesforce object.
This information is for Omnistudio for Managed Packages. For Omnistudio on standard runtime, see Omnistudio Help.
Note Users can enter text to filter Select element options only in LWC
Omniscripts.
- Drag a Select element from the Build panel onto the canvas.
- In the Properties panel, give the element a name in the Name field.
- In Field Label, enter a label visible to the user.
-
In Option Source, select the source of the options:
- Manual: (Default) Manually enter value and label pairs.
- Custom: Enter the Apex class and method that returns
the options. Use the format
ClassName.method. See Populating Picklist Values From Apex (Managed Package). - SObject: Retrieves the picklist values from the
Salesforce object and field. Use the format
ObjectAPIName.FieldAPIName.
-
If you select a manual option source, for each option follow these steps:
- Click + Add New Option.
- Enter the Value and visible Label.
- (Optional) Check Use as Default to make the option selected by default.
- (Optional) Check Auto Advance to advance the user to the next step when they click this option.
Note For best performance, we recommend that you add ten or fewer options. -
If you select Custom as an Option
Source, in the Source, enter the name of a
method to call on a class in the format
class.method. -
If you select SObject as an Option
Source, in the Source, enter the name of a
field on an object in the format
SObject.field. -
(Optional) To display options based on the selection of another value, configure
Controlling Field Type by following these steps:
- To define the source of the controlling field by retrieving picklist options from an Apex class, select Custom.
- To define the source of the controlling field by retrieving dependent picklist values from a Salesforce object, select SObject.
- In Controlling Field Source, enter an Apex class.
- In Controlling Field Element, enter an Omniscript element name.
- (Optional) For additional properties, see Common Omniscript Element Properties Definitions (Managed Package).
- Select Properties (Managed Package)
For the managed package runtime, select properties are configurable from the Properties panel when you select a Select element. With the Select element, enable users to make a selection from a dropdown list in your Omniscript.