Super Clone

Before You Begin

Before using the Super Clone feature for an Application, you'll need to create three Field Sets on the Application Object. These will appear under their respective headings in the Super Clone dialog:
  1. Target Record Fields
  2. Target Record Fields set to NULL
  3. Source Record Fields
See the section on "Using Super Clone" below for screenshots and annotations.
Important:

In the Super Clone dialog, if any fields in these Field Sets are marked "required" with a red asterisk:

  • You must edit all required fields before the "Start Clone" button becomes active.

If none of the fields are marked "required," there are different instructions for each Field Set:

  • Target Record Fields: You'll need to change at least one field before the "Start Clone" button is clickable.
  • Target Record Fields set to NULL: The "required" attribute has no function. Fields listed in this Field Set will be set to NULL on the target Record.
  • Source Record Fields: Updating fields in this Field Set before cloning is optional.

How to Create the Target Record and Source Record Field Sets

  1. Go to Setup > Object Manager and click on the Application object.

  2. On the Application Object details page, click Field Sets in the left column.
  3. On the Field Sets main page, click the New button in the upper right corner. This opens the New Field Set page.
  4. On the New Field Set page, using Target Record Fields as an example, add the following information:
    • Field Set Label: Target Record Fields
    • Field Set Name: Populates automatically as Target_Record_Fields
    • Enter a description for Where is this used?.


  5. Click Save. This takes you to a page where you can add the fields to the Field Set by dragging and dropping them.
  6. Add the fields you wish to include and click the Save button (upper left corner of the gray field container).

Repeat Steps 1-6 for Target Field Records Set to NULL and Source Record Fields.

Note:
If a Field Set is missing or empty, the title of the corresponding section will be grayed out in the Super Clone dialog with (No fields to update) appended to its label:

Using Super Clone

On the Application Record, click the Super Clone button.

The Super Clone dialog appears.

The Super Clone Dialog

The Super Clone Dialog - Annotations

Dialog Element Description
1. Source Record Object Application
2. Source Record Application ID
3. Source Record Owner The Owner listed on the Application Record
4. Clone Depth Select how many depth levels of the Application to clone. You can step down to the third child level.
5. Target Record Fields These fields default to the value on the source Record. At least one record must be updated before cloning. (See "Before You Begin" at the top of this page for instructions on creating this Field Set.)
6. Target Record Fields set to NULL These fields default to the value on the source Record and are set to NULL on the new Record. They appear in the dialog window with a strikethrough over the value. (See "Before You Begin" for instructions on creating this Field Set.) Boolean fields should not be included. To update boolean fields on a new record, add them to the Target Record Fields Field Set.
7. Source Record Fields These fields default to the value on the Record being cloned. Updating before cloning is optional. (See "Before You Begin" for instructions on creating this Field Set.)
8. Optional Settings
  • Specify Owner for Destination Records: Select an Owner for the new Record.
  • Specify Fields to Exclude: Select the fields that will be excluded from new Record.
9. Child Relationship Check or uncheck Child Objects for the new Record.

Instructions for Using a Custom Application Object

If you're using a custom application and not the default (EnrollmentrxRx__Enrollment_Opportunity__c), you will need to create the Super Clone button with a manually configured URL. Following are the steps for Salesforce Classic and Lightning Experience:

Salesforce Classic

Create the Button



  1. Go to Setup > Objects
  2. Click on the object you're using as your custom application
  3. Scroll down to the Buttons, Links, and Actions section
  4. Click on the New Button or Link button and enter the following settings:
    1. Label: Super Clone
    2. Display Type: Detail Page Button
    3. Behavior: Display in existing window with sidebar
    4. Button or Link URL: /apex/EnrollmentrxRx__SuperClone_AppLightningOut?recordId={!Custom_Application__c.Id}&sObjectName=Custom_Application__c
    5. Click Save

Add the Button to the Page Layout



  1. Return to the object main page and scroll to the Page Layouts section
  2. Edit the custom application's page layout by dragging and dropping the Super Clone button to the Custom Buttons area under Application Detail
  3. Click Save. The button should now be visible on the Custom Application record.

Lightning Experience

Create the Button

  1. Go to Setup > Object Manager
  2. Navigate to your custom application
  3. Click Buttons, Links, and Actions in the left column
  4. Click on the New Action button and enter the following details:
    1. Action Type: Lightning Component
    2. Lightning Component: EnrollmentrxRx:SuperClone_Main
    3. Height: 80px
    4. Label: Super Clone
  5. Click Save

Add the Button to the Page Layout



  1. From the custom application object, navigate to Page Layouts in the left column
  2. Click on the object's page layout
  3. Click Mobile & Lightning Actions in the field palette, and drag and drop the Super Clone button to the "Salesforce Mobile and Lightning Experience Actions" on the page layout
  4. Click Save