Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

ADvendio provides the user with a hierarchy of complex objects with many fields. In order to add a new record which often is similar to existing data the user now has to tediously fill out all the fields and add all the child records. Many customers had already requested custom clone functions. To simplify this process ADvendio offers a generic and reusable "clone" function.

...

  • Define the Depth of Child Object.
  • Define the Cloning confirmation. (if configureable the end user gets a page to select or de-select child objects.)
    1. No Confirmation: Doesn't show any confirmation message while starting cloning process. Cloning process start automatically as soon as the user clicks the clone button at the target record.
    2. Confirmation - Objects Not Changeable: Shows all objects being cloned in a tree structure. Users can't deselect any object in the tree. User needs to confirm the selection in order to start the actual clone process. This is the default option.
    3. Confirmation - Objects Configurable: Shows all objects being cloned in a tree structure. Users can deselect objects in the tree to exclude them from cloning. User needs to confirm the selection in order to start the actual clone process.

2a. Start and Child Objects 

...

  1. Navigate to Setup > Object Manager > "Objectname" > Buttons, Links and Actions and click the button New Button or Link.

  2. Enter a Label.
  3. Enter a Name (the field Name should be filled automatically but it is possible to change the API name).
  4. Enter a Description.
  5. Select the Display Type (Detail Page Button).
  6. Select Behavior (Display in new windows) and Content Source (URL).
  7. Enter the following code into the textarea field: {!URLFOR( "/apex/ADvendio__GenericCloneProcessor", null, [id={VariableOfIdOfTheMasterRecord}, fsId={IdOfTheGenericCloneConfiguration}] ) }.
    1. Classic: The IdOfTheGenericCloneConfiguration can be found opening the newly saved cloning configuration and copying the URL out of the browser. 
    2. Lightning: The IdOfTheGenericCloneConfiguration can be found opening Feature Settings and searching for Feature Name = "GenericCloneDetailConfigurationand the Template Name as the name of the object you want to Clone. The ID is the Feature Setting Name.
  8. Click the button Save.
  9. See the following code example to configure your Generic Clone feature correctly:

      → Code Example: {!URLFOR( "/apex/ADvendio__GenericCloneProcessor", null, [id=ADvendio__MediaCampaign__c.Id, fsId="a0jw0000007HIA6AAO"] ) }

  10. Drag the new button into the page layout and the feature can be used. 

...