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.

This function allows the user to duplicate any ADvendio object data record with a maximum of three levels of dependent child object records. Before being used the administrators have to configure the duplication process by predefining which fields need to be copied and which should be set to null. 

Info

Please not that active Workflow Rules, Processes, as well as any standard or custom triggers, will be triggered when creating Records or setting fields through the clone process which may set values counter to those in your Generic Clone Configuration.  


Overview

To use the Generic Clone function you will have to configure Generic Clone Setup for every "new" clone button.

...

  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. 

...