sf-fx-runtime-nodejs / UnitOfWork

Interface: UnitOfWork

Represents a UnitOfWork.

Methods 

registerCreate 

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.

Parameters 

NameTypeDescription
recordRecordForCreateThe record to create.

Returns: string

The ReferenceId for the created record.


registerDelete 

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

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

Parameters 

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 

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.

Parameters 

NameTypeDescription
recordRecordForUpdateThe record to update.

Returns: string

The ReferenceId for the updated record.

Product Retirement Announcement

Salesforce Functions is no longer available for purchase or renewal. To preserve the capabilities that Salesforce Functions provided to your org, deploy an alternative solution before your existing order term ends. See Salesforce Functions Retirement for more information on migrating your functions. Contact your Salesforce Account Executive for more information on Heroku.