Skip to main content

Context Details

Context details are a set of key-value pairs that provide additional information about the context in which a lookup is being accessed. These details are passed to the lookup queriers whenever they are invoked and they contain additional details around the action the user is taking, so can influence the intended results.

All context details are can be accessed through the getDetail() method, which returns a Map<String, Object> of the context details.

info

All context keys are case-sensitive and should be treated as immutable.

Generic Context

The following are the generic context details that are available to all lookups:

KeyDescription
seven20.Lookup.CONTEXT_RECORD_ID_KEYThe ID of the record that the lookup has been prefilled with. Present during getRecordDetail() calls
seven20.Lookup.CONTEXT_SEARCH_TERM_KEYThe search term entered by the user. Present during search() calls
danger

Always access these values through the constants provided.

Additional Context

Sometimes a lookup will be run with additional context, such as being expected to filter by a parent record, below are the additional context details that are available to specific lookups:

SObjectKeyDescription
seven20__Job__caccountIdProvides the parent Account record Id when filtering by account
warning

Always treat additional context as optional, as it may not be present in all invocations.