Private ReadonlyloggerPrivate ReadonlynsPrivate ReadonlyqueryPrivate ReadonlyschemaClears the lookup cache.
PrivatecreateEnables 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.
PrivatefieldQuery 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
Optionalfilter: 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')
OptionallookupFields: "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.
Optionallimit: 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.
OptionaluseCache: 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
OptionalcancelToken: CancellationTokenLooks up a single record by ID.
The ID of the record to lookup
OptionallookupFields: "all" | K[]Fields to lookup; when all or undefined all fields are fetched
OptionaluseCache: booleanOptionally use the query cache for retrieving the request records
OptionalcancelToken: CancellationTokenOptional cancellation token to signal the method that it should quit as soon as possible.
The record or undefined if it doesn't exist
Lookup multiple records by ID and returns their values mapped by record ID
Iterable list of IDs
OptionallookupFields: "all" | K[]Fields to lookup; when all or undefined all fields are fetched
OptionaluseCache: booleanOptionally use the query cache for retrieving the request records
OptionalcancelToken: CancellationTokenOptional cancellation token to signal the method that it should quit as soon as possible.
Records in a Map keyed by their record ID
OptionallookupFields: "all" | K[] | readonly K[]OptionalcancelToken: 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.
Optionalfilter: LookupFilter<T>The filter to apply when looking up the record.
OptionallookupFields: "all" | K[]The fields to include in the lookup result.
OptionaluseCache: booleanIndicates whether to use the cache for the lookup.
OptionalcancelToken: CancellationTokenThe cancellation token.
PrivatelookupOptionalwhere: stringOptionallimit: numberOptionaluseCache: booleanOptionalcancelToken: CancellationTokenPrivaterecord
Look up records from Salesforce using an more convenient syntax