Class SObject<S, N, FieldNames, RetrieveRecord, InputRecord, UpdateRecord>

A class for organizing all SObject access

Type Parameters

Constructors

Properties

_conn: Connection<S>
_logger: Logger
approvalLayouts$: CachedFunction<(() => Promise<DescribeApprovalLayoutsResult>)>

Type declaration

approvalLayouts$$: CachedFunction<(() => DescribeApprovalLayoutsResult)>
compactLayouts$: CachedFunction<(() => Promise<DescribeCompactLayoutsResult>)>

Type declaration

compactLayouts$$: CachedFunction<(() => DescribeCompactLayoutsResult)>
del: {
    (ids, options?): Promise<SaveResult[]>;
    (ids, options?): Promise<SaveResult>;
    (ids, options?): Promise<SaveResult | SaveResult[]>;
} = ...

Synonym of SObject#destroy()

Type declaration

delete: {
    (ids, options?): Promise<SaveResult[]>;
    (ids, options?): Promise<SaveResult>;
    (ids, options?): Promise<SaveResult | SaveResult[]>;
} = ...

Synonym of SObject#destroy()

Type declaration

deleteBulk: ((input?) => Batch<S, "insert" | "update" | "upsert" | "delete" | "hardDelete">) = ...

Synonym of SObject#destroyBulk()

Type declaration

    • (input?): Batch<S, "insert" | "update" | "upsert" | "delete" | "hardDelete">
    • Parameters

      • Optional input: string | Readable | Record[]

      Returns Batch<S, "insert" | "update" | "upsert" | "delete" | "hardDelete">

deleteHardBulk: ((input) => Batch<S, "insert" | "update" | "upsert" | "delete" | "hardDelete">) = ...

Synonym of SObject#destroyHardBulk()

Type declaration

    • (input): Batch<S, "insert" | "update" | "upsert" | "delete" | "hardDelete">
    • Parameters

      Returns Batch<S, "insert" | "update" | "upsert" | "delete" | "hardDelete">

insert: {
    (records, options?): Promise<SaveResult[]>;
    (records, options?): Promise<SaveResult>;
    (records, options?): Promise<SaveResult | SaveResult[]>;
} = ...

Synonym of SObject#create()

Type declaration

insertBulk: ((input?) => Batch<S, "insert" | "update" | "upsert" | "delete" | "hardDelete">) = ...

Synonym of SObject#createBulk()

Type declaration

    • (input?): Batch<S, "insert" | "update" | "upsert" | "delete" | "hardDelete">
    • Parameters

      • Optional input: string | Readable | Record[]

      Returns Batch<S, "insert" | "update" | "upsert" | "delete" | "hardDelete">

layouts$: CachedFunction<((ln?) => Promise<DescribeLayoutResult>)>

Type declaration

layouts$$: CachedFunction<((ln?) => DescribeLayoutResult)>

Type declaration

type: N
_logger: Logger = ...

Methods

  • Call Bulk#load() to execute bulkload, returning batch object

    Parameters

    • operation: "insert" | "update" | "upsert" | "delete" | "hardDelete"
    • Optional optionsOrInput: string | Object | Readable | Record[]
    • Optional input: string | Readable | Record[]

    Returns Batch<S, "insert" | "update" | "upsert" | "delete" | "hardDelete">

  • Bulkly insert input data using bulk API

    Parameters

    • Optional input: string | Readable | Record[]

    Returns Batch<S, "insert" | "update" | "upsert" | "delete" | "hardDelete">

  • Bulkly delete records specified by input data using bulk API

    Parameters

    • Optional input: string | Readable | Record[]

    Returns Batch<S, "insert" | "update" | "upsert" | "delete" | "hardDelete">

  • Bulkly hard delete records specified in input data using bulk API

    Parameters

    Returns Batch<S, "insert" | "update" | "upsert" | "delete" | "hardDelete">

  • Returns the list view info in specifed view id

    Parameters

    • id: string

      List view ID

    Returns ListView

  • Bulkly update records by input data using bulk API

    Parameters

    • Optional input: string | Readable | Record[]

    Returns Batch<S, "insert" | "update" | "upsert" | "delete" | "hardDelete">

  • Bulkly upsert records by input data using bulk API

    Parameters

    • Optional input: string | Readable | Record[]
    • Optional extIdField: string

    Returns Batch<S, "insert" | "update" | "upsert" | "delete" | "hardDelete">