vlocode-project - v1.40.0-beta-4
    Preparing search index...

    Class VlocityDatapack

    Simple representation of a datapack; maps common values to properties. Source of the datapsck can be accessed through the data property

    Implements

    Indexable

    • [key: string]: any
    Index

    Constructors

    Properties

    "#dataProxy": any
    data: object & { [key: string]: any }
    datapackType: string
    headerFile?: string
    key: string
    projectFolder?: string

    Accessors

    Methods

    • Recursively iterate over this datapack and child objects

      Parameters

      • object: object & { [key: string]: any } = ...

        object

      Returns Generator<any, void>

    • Returns a list of fields in this datapack that are considered global keys. Tries to match the standard GlobalKey__c format as well as group and version global keys.

      Returns string[]

      List of global key fields in this datapack

    • Recursively iterate over the properties of this datapack and it's child objects

      Parameters

      • target: object = ...

        object to iterate over

      Returns Generator<[string, string, any]>

    • Iterate over the source keys provided by this datapack

      Returns Generator<
          { VlocityRecordSObjectType: string; VlocityRecordSourceKey: string },
          void,
      >

    • Replace the global key on the specified object and all of it's child datapacks. with a new global key. This is useful when you want to clone a datapack. Optionally, you can provide a new global key to use otherwise a new one will be generated in UUID format.

      Parameters

      • object: object

        Datapack to replace global key on

      • keyField: string

        Field name of the global key

      • OptionalnewGlobalKey: string

        Optional new global key to use

      Returns string

      The new global key

    • Updates the global key of this datapack in-place and all of it's child datapacks. Use with caution as this will change the global key causing the datapack to be re-inserted on the next deployment.

      Parameters

      • OptionalfieldName: string

        Field name to use as global key. If not specified, all global key fields are updated.

      Returns void