Super Clone Pro
Configuration Settings

The Super Clone Pro configuration controls the clone, copy, edit, and display functionality. The configuration name is passed to the pages, flow action, or APEX API to tell the logic how to process.

Contents

New Configurations

Select the Super Clone Pro app and click on the Super Clone Pro Configuration tab. This tab shows a list of configurations. Click the New button to create a new configuration.

Press the New button to create a new clone configuration. Enter a name for the configuration. Select an object. This is the main object that will be cloned for this configuration. Leave the action set as Clone. Press Create to continue.

Configuration Settings

The top of the configuration page contains the configuration name, primary object, page behavior settings, and a list of related objects that can be selected for cloning.

  • Configuration Name is the text used to indicate which configuration to process with in the custom button, flows, or Apex API.
  • After Clone Display select what is displayed after the Clone action is performed. The ‘saveURL’ and ‘saveURL2’ URL parameters used in a Custom Button will override this selection.
    • Record List – Display a list of names and links to the cloned record.
    • First Record – Redirect to the new cloned record. The first cloned record will display when using the feature to clone multiple times.
    • Original Record – Redirect back to the source record that was cloned.
    • Object Page – Redirect to the default object page that shows recently viewed records and list views.
    • Super Clone Pro Edit Page – Redirect to Super Clone Pro’s Edit page after the clone page processing has completed. This is often useful when using the clone multiplier feature. It allows you to see and edit all cloned hierarchies on one page.
      • Use the “cfgedit” URL parameter to specify a different configuration for the edit page than was used for the clone page. This can be useful when you want to show a different set of fields when editing the hierarchy than was shown when cloning.  The URL parameter would look similar to this, “&cfgedit=myeditconfig”.
    • Batch Progress Page – Redirect to a page that shows progress of a batch job when a relationship is configured to process in Batch.
  • Description is a field to store helpful information on when or how the configuration is used.
  • Show Detailed Error Message will display the Apex exception message for errors during the insert or update of records. This can be helpful when troubleshooting why an insert or update failed, but it is not necessary to check for typical use.
  • Skip Clone Configuration Page will cause the clone process to bypass the Clone Confirmation page except when a problem is encountered during cloning. This setting is only used by the clone page.
  • Allow Cloning Multiple Times will display an input on the Clone Confirmation page that asks the user to enter the number of times a record should be cloned. Use caution when entering large numbers as a multiplier on the Clone Confirmation page because this may result in errors if governor limits are exceeded.
  • Send Email on Batch Errors – When configured to run processing in batch, an email will be sent to the user if there is an error during processing.
  • Send Email on Batch Success – When configured to run processing in batch, an email will be sent to the user if the transaction successfully processes without errors.

Relationship Hierarchy

The Relationship Tree section of the page allows you to add, remove, and change the display order of the child relationships.

  • Click the “Clone” button in the Relationship Tree to add child relationships.
  • Click the red “X” button to remove the relationship.
  • Click the up or down arrow to adjust the order in which the relationships display on both the configuration and clone confirmation pages.

After clicking the “Clone” button on a relationship, a window will appear that will allow you to select which child relationships to clone. Check the checkbox next to the relationship name to add a child relationship to the configuration.

The new relationship will appear in the relationship tree, and a section for the field configurations will appear at the bottom of the page in the Field Value Configuration section.

  • Click the relationship name to expand or collapse an individual section of field configurations.
  • Click “Collapse All” to hide all field configurations.
  • Click “Expand All” to show all field configurations.

Relationship Settings

The Field Value Configuration section contains a list of fields for the primary object and each selected child relationship. These configurations determine what a field’s value will be set to, how the field will appear on the page, and actions that will occur for the child relationships .

Settings at the top of each section control how the records are displayed on the confirmation page.

  • The Clone/Reparent picklist on the relationship title bar controls if new records are inserted from a cloned record or existing records are updated to relate to a different parent. The “Reparent” option will only display if the relationship field can be updated and if the field relationship allows reparenting in the case with Master-Detail relationships.

Display Setting controls how the records are displayed on the confirmation page for each relationship.

  • Detail View – Display all records for the relationship. The number of records queried per relationship will be limited 1000. This is because Visufalforce pages limit collections displayed on a page to 1000 items.
  • Summary View – Display a count of records for the relationship. This is not applicable to the primary object. A record limit is not put on the relationship query when Summary View is selected.
  • Hidden – Hide records for the relationship. A record limit is not put on the relationship query when Hidden is selected.

Processing controls if records in the relationship are inserted synchronously in the same transaction as other records, of if the inserts are passed to a batch job to be inserted in their own transaction. Batch processing is often done to keep the insert processing within Salesforce governor limits when an object contains a lot of custom logic to execute.

Processing of the records on and below this relationship of the record hierarchy will all be run in batch when Processing is set to Batch.

Query Without Sharing causes the query to retrieve the records to be executed without sharing. This can cause the query to pull in records that the user doesn’t have visibility to due to record sharing restrictions.

Hide Record Selection Checkbox controls if a checkbox is displayed on the confirmation page that will allow the user to uncheck records they do not wish to clone. This is not applicable to the primary object.

Filter By allows the records from the relationship to be filtered by a Checkbox or Checkbox Formula field. When Filter By field is specified, records where the filter checkbox is equal to true will be available for cloning and copying. Records where the filter checkbox is equal to false will be excluded. Using a checkbox formula field lets you leverage the power of Salesforce’s formula engine, so you can include things like references to related objects, conditional logic, date calculations, etc.  Find additional information about filtering with URL parameters here.

  • None – The none option indicates no filter field has been selected, and the all available records will be available.

Sort By contains a list of fields that can be used to sort the child relationship.

  • Default – If the first field set to display is sortable, the records will be displayed in ascending order by its value.
  • None – The records will not be retrieved in any specific order. This will typically be the order the records were created in, but it is not guaranteed.
  • Other Field Names – The records will sort in ascending order by the selected field.

Field Value Settings

Each field has its own configuration. The options vary depending on the fields type and properties.

  • Field Label is the label that will display on the confirmation page.
  • API Name is the underlying identifier of the field on the object.
  • Data Type describes what kind of information the field stores.
  • Action is the action that will occur during cloning and copying processes. More detail is provided below.
  • Value is used by some Actions to indicate more detail about how to process the field.
  • Show checkbox allows the field to be displayed on the confirmation page. The checkbox in the column header will check or uncheck all active checkboxes in the section below it.
  • Editable checkbox allows the field to be changed on the confirmation page. The checkbox in the column header will check or uncheck all active checkboxes in the section below it.
  • Required checkbox makes the field required on the confirmation page. The checkbox in the column header will check or uncheck all active checkboxes in the section below it.
  • Display Order is the sequence which the fields will display on the confirmation page.
  • –renumber– link will change the Display Order values to multiples of 5.

The Action column drop-down list contains a few different actions depending on the field, field type, and permissions.

  • — Clone — will copy the source record’s field value.
  • Action Formula List allows for more advanced date logic and setting a field in the cloned record to that of a different field on the original record. More detail can be found below. See Action Formula List Options for detail.
  • Clone with Prefix will add a text before the cloned value. This is only for fields with a String data type.
  • Clone with Suffix will add a text after the cloned value. This is only for fields with a String data type.
  • Current Date is an option for Date fields. It will set the field value to the current date.
  • Current Date/Time is an option for Date/Time fields. It will set the field value to the current date and time.
  • Current User is an option for Owner ID fields, and it will set the record owner to the user who is performing the clone operation.
  • Display Only is displayed for formula and non-createable fields.
  • Exclude from Query This prevents the field from being included in the queried object records. Selecting Exclude from Query is required when cloning Person Accounts. “Leave Empty” is recommended to set the field value to null.
  • Leave Empty will null out the value, so the new record’s field will be left empty.
  • Relationship Field is displayed for the field that references the parent object in the relationship.
  • Reference Clone / Clear is used on reference fields. If the record referenced in the reference field was cloned in the record hierarchy, the value will be updated to reference the new cloned record. Otherwise, the value will be removed from the lookup field. This is useful for parent records that reference a specific child record in the relationship tree and child records that have lookups to the parent record.
  • Reference Clone / Keep is used on reference fields. If the record referenced in the reference field was cloned in the record hierarchy, the value will be updated to reference the new cloned record. Otherwise, the field value will retain the cloned value.This is useful for parent records that reference a specific child record in the relationship tree and child records that have lookups to the parent record.
  • Set by URL Parameter will set the field value to a value found in the confirmation page’s URL.
    • Enter text into the Value column that will be used as a URL parameter name. For example: myparam.  Then when configuring the custom button, you can specify “&myparam=theValue”.
  • Set to Default will use value defined in the field definition’s default to set the value in the cloned record.
  • Set Value will allow field values to be specified. Reference fields will show a lookup to select a record.
  • +/- Days from Current is an option for Date and Date Time fields, and it will set the field value to the current date or data time plus the specified number of days.
  • +/- Days from Record is an option for Date and Date Time fields, and it will set the field value to the record’s date or data time plus the specified number of days.

Be sure to Save after creating or updating a configuration. The next step in the process is to create a custom button.

Additional Information