[sf-fx-runtime-nodejs](/docs/platform/functions/guide/NODE_README.md) / Exports

# Exports

## Type aliases

### Record

Ƭ **Record**: *object*

Record items from a query or queryMore request.

**`property`** type The Salesforce Object type.

**`property`** fields A JavaScript object with all fields from the returned records.
Each key in `field` is case insensitive, so the getters and setters for each key/value
pair ignore casing when getting and setting the fields.

**`property`** binaryFields An optional JavaScript Object with unencoded binary content buffers to create the record with. Each key in `binaryFields` is case insensitive, so the getters and setters for each key/value
pair ignore casing when getting and setting the fields.

#### Type declaration

| Name            | Type                           |
| :-------------- | :----------------------------- |
| `binaryFields?` | { `[key: string]`: `Buffer`; } |
| `fields`        | *object*                       |
| `type`          | *string*                       |

***

### RecordForCreate

Ƭ **RecordForCreate**: *object*

Creates a single record for create or registers a record creation for the [UnitOfWork](/docs/platform/functions/guide/unitofwork.md)
and returns a [ReferenceId](/docs/platform/functions/guide/modules.md#referenceid).

**`property`** type The Salesforce Object type.

**`property`** fields A JavaScript Object for the fields that the record will be created with. The keys
in the object are case insensitive.

**`property`** binaryFields An optional JavaScript Object with unencoded binary content buffers to create the record with. Each key in `binaryFields` is case insensitive, so the getters and setters for each key/value
pair ignore casing when getting and setting the fields.

#### Type declaration

| Name            | Type                           |
| :-------------- | :----------------------------- |
| `binaryFields?` | { `[key: string]`: `Buffer`; } |
| `fields`        | *object*                       |
| `type`          | *string*                       |

***

### RecordForUpdate

Ƭ **RecordForUpdate**: *object*

Creates a single record for update or registers a record update for the [UnitOfWork](/docs/platform/functions/guide/unitofwork.md)
and returns a [ReferenceId](/docs/platform/functions/guide/modules.md#referenceid).

**`property`** type The Salesforce Object type.

**`property`** fields A JavaScript Object for the fields that the record will be updated with. The keys
in the object are case sensitive and must be lowercase.

**`property`** binaryFields An optional JavaScript Object with unencoded binary content buffers to create the record with. Each key in `binaryFields` is case insensitive, so the getters and setters for each key/value
pair ignore casing when getting and setting the fields.

#### Type declaration

| Name            | Type                           |
| :-------------- | :----------------------------- |
| `binaryFields?` | { `[key: string]`: `Buffer`; } |
| `fields`        | *object*                       |
| `fields.id`     | *string*                       |
| `type`          | *string*                       |

***

### ReferenceId

Ƭ **ReferenceId**: *string*

References a record that will be created, deleted, or modified in the future.

***

### SalesforceFunction

Ƭ **SalesforceFunction**\<A, B>: (`event`: [*InvocationEvent*](/docs/platform/functions/guide/invocationevent.md)\<A>, `context`: [*Context*](/docs/platform/functions/guide/context.md), `logger`: [*Logger*](/docs/platform/functions/guide/logger.md)) => *Promise*\<B> | B

Main interface for Salesforce Functions.

#### Type parameters

| Name |
| :--- |
| `A`  |
| `B`  |

#### Type declaration

▸ (`event`: [*InvocationEvent*](/docs/platform/functions/guide/invocationevent.md)\<A>, `context`: [*Context*](/docs/platform/functions/guide/context.md), `logger`: [*Logger*](/docs/platform/functions/guide/logger.md)): *Promise*\<B> | B

#### Parameters

| Name      | Type                                                                      |
| :-------- | :------------------------------------------------------------------------ |
| `event`   | [*InvocationEvent*](/docs/platform/functions/guide/invocationevent.md)<A> |
| `context` | [*Context*](/docs/platform/functions/guide/context.md)                    |
| `logger`  | [*Logger*](/docs/platform/functions/guide/logger.md)                      |

**Returns:** *Promise*\<B> | B
