cloneOneToManyRecords()
Overview
public any function cloneOneToManyRecords(
required string objectName
, required string recordId
, required string newRecordId
, required string propertyName
, boolean isDraft = false
)
Clones related one-to-many records for a given source record + new cloned record ID
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
| objectName | string | Yes | Name of the object whose source record is being cloned |
| recordId | string | Yes | ID of the source record that is being cloned |
| newRecordId | string | Yes | ID of the newly cloned record |
| propertyName | string | Yes | Property that defines the one-to-many relationship whose records we will also clone |
| isDraft | boolean | No (default=false) | Whether or not the clone is a draft record |