Versions Compared

Key

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

Create new Proposals Versions/Alternative Offers

...

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 originally the original Media Campaign can also be also defined in order to compare all versions of a Media Campaign. Here is how you do it:

...

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

Image RemovedImage Added

Create a new custom field:

  1. Navigate to Setup > Create > ObjectsObject Manager > Media Campaign > Custom 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 NextNext.
  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 = TRUETrue).
  10. Click the button Next .Select and select the Page Layouts that should include this related list.
  11. Click the button Save. 

...

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 a 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.

Image RemovedImage Added

Create a new custom field:

  1. Navigate to Setup > Create > ObjectsObject Manager > Media Campaign > Custom 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 = TRUETrue).
  8. Click the button Next.
  9. Select the Page Layouts that should include this field.
  10. Click the button Next.

You have successfully created a an auxiliary field, which can be filled with the record id ID of the Media Campaign.

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). 

Image RemovedImage Added

Create a new Generic Clone Configuration:

  1. Navigate to Overview > Setup & Setting > App Launcher > Generic Clone Configuration.
  2. Click the button New Configuration Setup.
  3. Enter 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.

...

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 Vaule Value etc...).

Image RemovedImage Added

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 "_AlernativeAlternative".
    • Stage: Set Value to Alternative Quote.
    • ...see Screenshot for more possible field configuration.
  6. Click the button Save.

Generic Clone - Create Clone Button

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

Image RemovedImage Added

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

  1. Navigate to Setup

...

  1.  > Object Manager > Media Campaign > Buttons, Links and Actions and click the button New Button or Link.

  2. Enter

...

  1. a Label.
  2. Enter

...

  1. a Name (the

...

  1. field Name

...

  1.  should be filled automatically but it is possible to change the API name).
  2. Enter

...

  1. a Description.
  2. Select

...

  1. the Display Type (Detail Page Button).

...

  1. Select Behavior (Display in new windows)

...

  1. and Content Source (URL).
  2. Enter the following code into the textarea field:

...

  1.  {!URLFOR( "/apex/ADvendio__GenericCloneProcessor

...

  1. ", null, [id={VariableOfIdOfTheMasterRecord}

...

  1. , 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.
  2. Click the

...

  1. button Save.

...

  1. See the following code example to configure your Generic Clone feature correctly

...

  1. :

      → Code Example: {!URLFOR( "/apex/ADvendio__GenericCloneProcessor

...

  1. ", null, [id=

...

  1. ADvendio__MediaCampaign__c.Id

...

  1. , fsId="a0jw0000007HIA6AAO"] ) }

  2. 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. 

...

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

Image RemovedImage Added

Select the object to which this workflow rule applies and select, what should happen:

  1. Navigate to Setup > Create > Objects > Workflow & Approvals > 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 Evaluate the rule when a record is: created.
    4. Run this rule if the following formula evaluates to true: ISBLANK( Parent_Media_Campaign_ID_ParentMediaCampaignID__c).
  5. Click the button Save & Next.
  6. Add Workflow Action: New  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 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.

Image RemovedImage Added

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

  1. Navigate to Setup > Create > Objects >  > Object Manager > Media Campaign >  > Buttons, Links and Actions and  and click the button button New Button or Link.
  2. Enter a Label, for instance "Parent Media CamapignCampaign".
  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.Parent_Media_Campaign_IDParentMediaCampaignID__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.

...