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.
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:
| Key | Description |
|---|---|
seven20.Lookup.CONTEXT_RECORD_ID_KEY | The ID of the record that the lookup has been prefilled with. Present during getRecordDetail() calls |
seven20.Lookup.CONTEXT_SEARCH_TERM_KEY | The search term entered by the user. Present during search() calls |
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:
| SObject | Key | Description |
|---|---|---|
| seven20__Job__c | accountId | Provides the parent Account record Id when filtering by account |
Always treat additional context as optional, as it may not be present in all invocations.