Use targetFieldUpdates to update field values on the root object in the cloned record
and handle Salesforce restrictions on certain field values when cloning a record.
Required Editions
For example, Salesforce prevents cloning an Order with its status as Activated. Provide a
Draft status value in targetFieldUpdates for a successful clone.
The following partial JSON example shows how to update root object field values on the cloned
record:
{
"recordId": "801Hs000005meynIAA",
"sObjectName": "Order",
"executionMode": "sync",
"runPricing": false,
"runValidation": false,
"targetRecordTypeDevName": "EnterpriseOrder",
"targetFieldUpdates": {
"Name": "Cloned Enterprise Order",
"Description": "Order cloned with status update",
"Status": "Draft"
}
"objectDetailsInSortedOrder": [
{
"objectName": "Order",
"className": "B2BCmexCloneImpl",
"filterFieldName": "Id",
"filterOnObject": "Order",
"dependentFields": []
}
]
}