The Super Clone configuration controls the clone, edit, and copy behavior. Each page uses the configuration a little differently. The clone page uses all settings seen on the configuration. The edit page ignores the Action and Value columns of the configuration, so field values of existing records are only changed by the user of the page when a field is editable. They copy page ignores the edit check box on the primary object because this page is intended only to create new related lists on existing objects.
To setup a new configuration, select the Super Clone app to see the Super Clone Configuration tab. This tab shows a list of configurations and the New button.
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. Press Create to continue.
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 in the custom button to indicate to use the configuration.
- After Clone Display select what is displayed after the Clone action is performed. The ‘saveURL’ or ‘saveURL2’ URL parameter 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 if cloning the feature to clone multiple times.
- Original Record – Redirect back to the source record that was cloned.
- Object Page – Display the default object page that shows recently view records and list views.
- Description is a field to save 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. A user should use caution entering large numbers because this may result in reaching governor limit errors.
Next, select Child Relationships to clone. Check the checkboxes next to the child relationship name, and a new Field Values section will appear for that relationship.
The Field Value Configuration section contains a list of fields for the primary object and each selected related object. These configurations determine what a field’s value will be set to and how the field will appear on the page.
- Action drop-down list contains a few different actions depending on the field, field type, and permissions. This column is used by clone and copy pages, and it is ignored by the edit page.
- — Clone — will copy the current record’s field value.
- Leave Empty/Default will null out the value, so the new record’s field will either have nothing or a default value if one is specified for the field.
- Set Value will allow field values to be specified. Reference fields will show a lookup to select a record.
- 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.
- Clone with Version Number Suffix will add version or copy number at the end of the value in the Primary Object’s name field. Super Clone attempts to find records with the same name, and one is added to the highest version number found. This is only used for the Primary Object’s name and not for any child objects.
- 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.
- Current Date is an option for Date fields, and it will set the field value to the current date.
- Current Date/Time is an option for Date Time fields, and it will set the field value to the current date and time.
- +/- 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.
- Show check box allows the field to be displayed on the page.
- Display Order is the sequence which the fields will display on the page.
- –renumber– will change the Display Order values to multiples of 5.
Be sure to Save after creating or updating a configuration. The next step in the process is to create a custom button.