---
schema_version: "1"
id: 2d3e3139ced77af211b1811a964921b8c25f6a4014aeea6377998ad682fbeeb0
title: Exports
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/salesforce-functions/functions/guide/nodesdk/modules.md
canonical_url: https://developer.salesforce.com/docs/platform/functions/guide/modules.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 4f339f504eba72719557d860f226e2a805a4aa7d4cf461d4c2982c1a4f180280
products:
  - Salesforce Functions
---
[sf-fx-runtime-nodejs](https://developer.salesforce.com/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](https://developer.salesforce.com/docs/platform/functions/guide/interfaces/unitofwork.md)
and returns a [ReferenceId](https://developer.salesforce.com/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](https://developer.salesforce.com/docs/platform/functions/guide/interfaces/unitofwork.md)
and returns a [ReferenceId](https://developer.salesforce.com/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_](https://developer.salesforce.com/docs/platform/functions/guide/interfaces/invocationevent.md)<A\>, `context`: [_Context_](https://developer.salesforce.com/docs/platform/functions/guide/interfaces/context.md), `logger`: [_Logger_](https://developer.salesforce.com/docs/platform/functions/guide/interfaces/logger.md)) => _Promise_<B\> \| B

Main interface for Salesforce Functions.

#### Type parameters

| Name |
| :--- |
| `A`  |
| `B`  |

#### Type declaration

▸ (`event`: [_InvocationEvent_](https://developer.salesforce.com/docs/platform/functions/guide/interfaces/invocationevent.md)<A\>, `context`: [_Context_](https://developer.salesforce.com/docs/platform/functions/guide/interfaces/context.md), `logger`: [_Logger_](https://developer.salesforce.com/docs/platform/functions/guide/interfaces/logger.md)): _Promise_<B\> \| B

#### Parameters

| Name      | Type                                                   |
| :-------- | :----------------------------------------------------- |
| `event`   | [_InvocationEvent_](https://developer.salesforce.com/docs/platform/functions/guide/interfaces/invocationevent.md)<A\> |
| `context` | [_Context_](https://developer.salesforce.com/docs/platform/functions/guide/interfaces/context.md)                     |
| `logger`  | [_Logger_](https://developer.salesforce.com/docs/platform/functions/guide/interfaces/logger.md)                       |

**Returns:** _Promise_<B\> \| B
