Add the #DF24 Developer Keynote to your agenda. Join us in-person on 9/18 at 2:30 p.m. PT or on Salesforce+ at 5 p.m. PT for the must-see session built just for developers.

sf-fx-runtime-nodejs / UnitOfWork

Interface: UnitOfWork

Represents a UnitOfWork.

registerCreate(record: RecordForCreate): string

Registers a RecordForCreate for the UnitOfWork and returns a ReferenceId that can be used to refer to the created record in subsequent operations in this UnitOfWork.

NameTypeDescription
recordRecordForCreateThe record to create.

Returns: string

The ReferenceId for the created record.


registerDelete(type: string, id: string): string

Registers a deletion of an existing record of the given type and id.

NameTypeDescription
typestringThe object type of the record to delete.
idstringThe id of the record to delete.

Returns: string

The ReferenceId for the deleted record.


registerUpdate(record: RecordForUpdate): string

Registers a RecordForUpdate for the UnitOfWork and returns a ReferenceId that can be used to refer to the updated record in subsequent operations in this UnitOfWork.

NameTypeDescription
recordRecordForUpdateThe record to update.

Returns: string

The ReferenceId for the updated record.