Execution Order - SalesforceLabs/record-hunter GitHub Wiki
What is Execution Order?
Record Hunter components work in sequence, passing search results from one to another like a relay. The flow of a record search on the page created in the Quick Start follows these steps:
RHG - Action Buttons
: Triggers the search by sending a request toRHG - Search
.RHG - Search
: Searches for records based on the entered keyword and passes the results toRHG - Filter
.RHG - Filter
: Filters the results further based on specified conditions and sends them toRHG - List
.RHG - List
: Retrieves the necessary field values based on the filtered results and displays them on the screen.
Setting the Order Property
When using Record Hunter, it's essential to set the Order property for each component to ensure they run in the intended sequence. The Order property defines the execution flow between components that send or receive search results.
An exception is RHG - Action Buttons
, which uses the Target Component Order property instead of the Order property. This property defines the Order value of the component where the search process begins, as RHG - Action Buttons
only triggers the search but doesn't perform the search itself.
Common Patterns
The components execute in the order defined by the Order property. To ensure proper handoff, the Order values must be sequential. Here are some examples:
RHG - Search
and RHG - List
Example 1: Using RHG - Action Buttons
: Target Order = 1RHG - Search
: Order = 1RHG - List
: Order = 2
RHG - Filter
components (e.g., for grouping search conditions)
Example 2: Using two RHG - Action Buttons
: Target Order = 1RHG - Filter
: Order = 1RHG - Filter
: Order = 2RHG - List
: Order = 3
Example 3: Placing two search processes on one screen
RHG - Action Buttons
: Target Order = 1RHG - Filter
: Order = 1RHG - List
: Order = 2RHG - Action Buttons
: Target Order = 4RHG - Filter
: Order = 4RHG - List
: Order = 5
By controlling the Order property, Record Hunter allows for flexible and advanced search configurations.