Loading
Upcoming Mandatory Changes to Public Key Infrastructure (PKI)Read More
Salesforce Enforces New Security Requirements in Summer 2026Read More
Communications Cloud
Table of Contents
Select Filters

          No results
          No results
          Here are some search tips

          Check the spelling of your keywords.
          Use more general search terms.
          Select fewer filters to broaden your search.

          Search all of Salesforce Help
          Update Root Object Field Values When Cloning

          Update Root Object Field Values When Cloning

          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

          Available in:

          For example, Salesforce prevents cloning an Order with its status as Activated. Provide a Draft status value in targetFieldUpdates for a successful clone.

          Note
          Note targetFieldUpdates applies only when cloning to a new record. If you specify a targetRecordId, Salesforce restrictions still apply.

          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": []
                  }
              ]
          }
          
           
          Loading
          Salesforce Help | Article