Versions Compared

Key

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

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

Create new Proposals Versions/Alternative Offers

Here we show you one example how to set up and use the Generic Clone Feature to copy Media Campaign records and its child records.

Business Case: In order to offer several options of a Media Campaign proposal to your customer, you can clone an existing Media Campaign including all its relevant information. Moreover, a link back to the original Media Campaign can also be defined in order to compare all versions of a Media Campaign. Here is how you do it:

Parent Media Campaign - Manual vs. Automated Process

You can choose from those two options: 

Media Campaign - Option 1 - Create Lookup Manual Process

Create a lookup field on Media Campaign object to build a Parent Media Campaign relation. 

...

  1. Navigate to Setup > Object Manager > Media Campaign > Fields & Relationships.
  2. Click the button New.
  3. Select Lookup Relationship as Data Type.
  4. Click the button Next.
  5. Select Media Campaign at the field Related To.
  6. Click the button Next.
  7. Enter the following information:
    • Field Label: Parent Media Campaign
    • Field Name: ParentMediaCampaign
    • Description: This field relates to the Master Media Campaign.
    • Help Text: Please enter the Parent Media Campaign.
    • Child Relationship Name: MediaCampaigns
  8. Click the button Next.
  9. Select the Field-Level Security for Profiles (Visible = True).
  10. Click the button Next and select the Page Layouts that should include this related list.
  11. Click the button Save. 

You have successfully created a Parent Media Campaign Lookup.

Media Campaign - Option 2 - Automated Process

While creating a new Media Campaign, the user now can manually enter the current Media Campaign to this lookup called Parent Media Campaign. To automatically set this hierarchy, the system administrator can create an auxiliary field and a custom link to the Media Campaign. A text field at Media Campaign level should be created to create a Parent Media Campaign relation. This field is then filled by a workflow with the record id of the Media Campaign. Any button, link or formula is able to grab the value of this field and create a connection to the Master Media Campaign.

...

  1. Navigate to Setup > Object Manager > Media Campaign > Fields & Relationships.
  2. Click the button New.
  3. Select Text as Data Type.
  4. Click the button Next.
  5. Enter the following information:
    • Field Label: Parent Media Campaign ID.
    • Length: 255.
    • Field Name: ParentMediaCampaignID.
    • Description: This field relates to the Master Media Campaign.
    • Help Text: Please enter the Parent Media Campaign Record ID.
  6. Click the button Next.
  7. Select the Field-Level Security for Profiles (Visible = True).
  8. Click the button Next.
  9. Select the Page Layouts that should include this field.
  10. Click the button Next.

...

Note

It is recommended not to show this field in the page layout to the users.

Setup Generic Clone Configuration - General Information

Using the salesforce standard duplication button it is possible to clone a record, for instance, the user is able to copy a Media Campaign. Using the advanced ADvendio "Generic Clone" feature it is possible to copy a record and additionally clone all its child object records (up to three levels depth). 

...

  1. Navigate to App Launcher > Generic Clone Configuration.
  2. Click the button New Configuration Setup.
  3. Enter all relevant information:
    • Configuration Setup Name: Enter a name for your new configuration.
    • Description: Enter a description, what this configuration will do.
    • Object Filter: Decide, if you want to search for ADvendio Objects or also for Standard Objects.
    • Select the start object to configure: Select your master object, in this case: Media Campaign (ADvendio__MediaCampaign__c)
  4. Click the button Continue.

In the next step, the system administrator is able to define objects, which should be cloned as well as define how to copy all relevant fields.

Setup Generic Clone Configuration - Object Information

No matter which option you have chosen before you will have to do this step. On the next screen you can select all objects, that should be cloned. Here also configure all relevant fields, and define how and if they should be cloned (Clone, Set Value etc...).

Configure objects and their fields:

  1. Select the Depth of Child Objects.
  2. Define the Cloning confirmation.
  3. Select Start and Child Objects, that should be cloned.
  4. Enter a Cloning Condition, if needed and select the Action if condition not met.
  5. Define the Field Configuration for every object, you have selected at Start and Child Objects, e.g.:
    • Media Campaign Name: Clone with Suffix "_Alternative".
    • Stage: Set Value to Alternative Quote.
  6. Click the button Save.

Generic Clone - Create Clone Button

To give users the possibility to use Generic Clone, the System Administrator has to create a custom button.

Enter the information below to generate a custom button and use Generic Clone:

  1. Navigate to Setup > Object Manager > Media Campaign > 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. 

The user is now able to manually enter the Master Media Campaign. It is possible to build a hierarchy, that all new created Media Campaigns are related to the previous one, but it is also possible to have all alternative Media Campaigns related to one Master Media Campaign. If you have chosen the automated process you will have to finish the implementation with the next step. 

Workflow - Option 2 - Field Update to automate link to Parent Media Campaign

Create a workflow and a criteria to trigger for your workflow rule.

...

  1. Navigate to Setup > Workflow Rules > New Rule.
  2. Select the Object: Media Campaign.
  3. Click the button Next.
  4. Enter the following information:
    1. Rule Name: Parent Media Campaign ID.
    2. Description: Check, if Parent Media Campaign is empty.
    3. Evaluate the rule when a record is: created.
    4. Run this rule if the following formula evaluates to true: ISBLANK(ParentMediaCampaignID__c)
  5. Click the button Save & Next.
  6. Add Workflow Action: New Field Update.
  7. Enter the following information:
    1. Name: Parent Media Campaign ID.
    2. Unique Name: ParentMediaCampaignID.
    3. Description: Updates the field with current Media Campaign ID while creation.
    4. Field to Update: Parent Media Campaign ID.
    5. Use a formula to set the new value: Id.
  8. Click the button Done.
  9. Click the button Activate.

While creating a Media Campaign, the ID is now available in the field Parent Media Campaign ID. This auxiliary field can also be copied using Generic Clone.

Custom Link or Button

To give users the possibility to navigate to the Master Media Campaign, the system administrator has to create a custom button or link.

...

Enter the information below to generate a custom button and use Generic Clone:

  1. Navigate to Setup > Object Manager > Media Campaign > Buttons, Links and Actions and click the button New Button or Link.
  2. Enter a Label, for instance "Parent Media Campaign".
  3. Enter a Name (the field Name should be filled automatically but it is possible to change the API name).
  4. Enter a Description, for instance "This custom button directs the user back to the Master Media Campaign."
  5. Select the Display Type (Detail Page Button or Detail Page Link).
  6. Select Behavior (Display in new windows) and Content Source (URL).
  7. Enter the following code into the textarea field: /{!ADvendio__MediaCampaign__c.ParentMediaCampaignID__c}.
  8. Click the button Save.

Drag the new button into the page layout. The user is now able to navigate back to the original Master Media Campaign after creating alternative Media Campaign proposals.

...