vlocode-project - v2.4.3
    Preparing search index...

    Class DatapackLookupService

    Implements

    • DatapackDependencyResolver
    Index

    Constructors

    Properties

    distinctLogger: Logger
    logger: Logger = ...
    lookupCache: Map<
        string,
        { entries: Map<string, string | undefined>; refreshed: number },
    > = ...
    namespaceService: VlocityNamespaceService
    recordComparer: OrgRecordComparer
    salesforce: SalesforceService

    Methods

    • Build a normalized matching key for a lookup filter so lookups can be indexed for fast record matching. Returns undefined when the filter cannot be indexed safely - i.e. it contains a non-string value or a value that OrgRecordComparer.fieldEquals could match fuzzily (a date-equivalent string) - in which case the caller falls back to a linear comparison for that lookup.

      Parameters

      • filter: object

        Lookup filter

      • fields: string[]

        Sorted list of the filter's field names

      Returns string | undefined

    • Build the matching key for a queried record using the given fields; mirrors buildFilterMatchKey so a record and the lookup filter it satisfies produce the same key.

      Parameters

      • record: object

        Queried record

      • fields: string[]

        Sorted list of the filter's field names

      Returns string

    • Parameters

      • sobjectType: string
      • key: string | undefined

      Returns string | undefined

    • Parameters

      • sobjectType: string
      • key: string | undefined
      • Optionalresolver: (key: string) => string | Promise<string | undefined> | undefined

      Returns Promise<string>

    • Parameters

      • obj:
            | { VlocityLookupRecordSourceKey: string }
            | { VlocityMatchingRecordSourceKey: string }

      Returns string

    • Lookup multiple records over multiple SObjects using the specified filters

      Parameters

      • lookups: { filter: object; sobjectType: string }[]

        lookup requests

      • OptionalcancelToken: CancellationToken

      Returns Promise<(string[] | undefined)[]>

      Array with all matched records or undefined when no matches found

    • Resolve the records for a set of dependencies in Salesforce; returns the real record IDs for each dependency.

      Parameters

      • dependencies: DependencyResolutionRequest[]

        Array of dependency resolution requests

      Returns Promise<{ resolution: string | undefined }[]>