Private
Readonly
loggerPrivate
Readonly
nsPrivate
Readonly
queryPrivate
Readonly
schemaPrivate
createEnables or disables the lookup cache for all lookups performed by this service instance.
useCache
parameter.useCache
parameter will be ignored.A boolean value indicating whether the lookup cache should be enabled or disabled.
Private
fieldQuery multiple records based on the where condition. The filter condition can either be a string or a complex filter object.
Name of the SObject type to lookup
Optional
filter: LookupFilter<T>Object filter or Where conditional string, by default the object filter uses and equals comparison (=). A different comparison mode can be specified by prefixing the value with any of these operators:
!=
: not equals>
: greater then<
: smaller then~
: like/containsArrays are interpreted as as includes
operator. For example:
lookup('Account', { Name: ['Peter', 'ACME'] }, ['Id', 'Name'] )
will translate to the follow query:
select Id, Name from Account where Name includes ('Peter', 'ACME')
You can also specify multiple filters by passing an array of objects or strings:
lookup('Account', [{ Name: 'Peter' }, { Name: 'ACME' }], ['Id', 'Name'] )
Which will translate to the follow query:
select Id, Name from Account where (Name = 'Peter') or (Name = 'ACME')
Optional
lookupFields: "all" | K[] | readonly K[]fields to lookup on the record, if not field list is provided this function will lookup All fields. Note that the Id field is always included in the results even when no fields are specified, or when a limited set is specified.
Optional
limit: numberlimit the number of results to lookup, set to 0, null, undefined or false to not limit the lookup results; when specified as 1 returns a single record instead of an array.
Optional
useCache: booleanwhen true instructs the QueryService to cache the result in case of a cache miss and otherwise retrive the cached response. The default behavhior depends on the
Optional
cancelToken: CancellationTokenQueryService configuration.
Lookup records in the target org by their record ID
Optional
lookupFields: "all" | K[]Fields to lookup, any fields that do not exist on the object type are ignored. In case all
or undefined all fields are retrieved.
Optional
useCache: booleanOptionally use the query cache for retrieving the request records
Optional
cancelToken: CancellationTokenOptional cancellation token to signal the method that it should quite as soon as possible.
Records in a Map keyed by their record ID
Optional
lookupFields: "all" | K[]Optional
useCache: booleanOptional
cancelToken: CancellationTokenOptional
lookupFields: "all" | K[] | readonly K[]Optional
cancelToken: CancellationTokenLooks up a single record of a given type based on the provided filter.
The type of the record to lookup.
The type of the lookup fields.
The type of the record to lookup.
Optional
filter: LookupFilter<T>The filter to apply when looking up the record.
Optional
lookupFields: "all" | K[]The fields to include in the lookup result.
Optional
useCache: booleanIndicates whether to use the cache for the lookup.
Optional
cancelToken: CancellationTokenThe cancellation token.
Private
lookupOptional
where: stringOptional
limit: numberOptional
useCache: booleanOptional
cancelToken: CancellationTokenPrivate
record
Look up records from Salesforce using an more convenient syntax