Provides access to Database Schema methods like describe.

Hierarchy

  • SalesforceSchemaService

Constructors

Properties

connectionProvider: SalesforceConnectionProvider
fieldMatchingStrategies: ((field, name) => boolean)[] = ...

Type declaration

    • (field, name): boolean
    • Parameters

      • field: Field
      • name: string

      Returns boolean

logger: Logger
nsService: NamespaceService
schemaAccess: CompositeSchemaAccess

Methods

  • Resolve an SObject field based on it's path; returns an array of Field's

    Parameters

    • type: string

      SObject type

    • fieldName: string

    Returns Promise<Field[]>

  • Resolve an SObject field based on it's path; returns an array of Field's

    Parameters

    • type: string

      SObject type

    • fieldName: string
    • throwWhenNotFound: boolean

      trye to throw an exception when the type is not found otherwise return null;

    Returns Promise<undefined | readonly Field[]>

  • Checks if the SObject is defined; similar describeSObject but does an extra check on the SObject definition through the tooling API

    Parameters

    • type: string

      Type of SObject

    Returns Promise<boolean>

  • Checks if the SObject Field is defined; similar describeSObjectField but does an extra check on the Field definition through the tooling API.

    Parameters

    • type: string

      Type of SObject

    • field: string

      Name of the field

    Returns Promise<boolean>

  • Transforms a property like Salesforce field to a valid Salesforce field or field path, for exampled transforms contract.account.name -> vlocity__cmt_Contract__c.Account.Name

    Parameters

    • type: string

      SOBject type

    • path: string

      Full path of properties

    Returns Promise<string>