Versions Compared

Key

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

The Lighting Component Campaign Items Related List has a couple of default settings defined which a technical administrator can change according to the following documentation. 

...

Feature Name

Feature Setting Name

default value

CampaignItemRelatedList

SortByField

Code Block
{"Field":["ADvendio__SortOrder__c"],"Order":"asc"}

...

Feature Name

Feature Setting Name

default value

CampaignItemRelatedList

TableFields

Code Block
{
   "TableFields":[
      "Name",
      "ADvendio__Period__c",
      "ADvendio__Quantity__c",
      "ADvendio__Sales_Price__c",
      "ADvendio__Billing_category__c",
      "ADvendio__Amount_net3__c",
      "ADvendio__Available__c",
      "ADvendio__PositionNumber__c",
      "ADvendio__PositionNumberAppendix__c"
   ]
}

...

Feature Name

Feature Setting Name

Default Filter Value

CampaignItemRelatedList

FilterButtons

Code Block
{
   "Buttons":[
      {
         "title":"Don't Show Cancelled Item",
         "labelcustomLabel":"Don't Show Cancelled ItemDontShowCanceled",
         "namespaceLabel":"ADvendio",
         "filter":"ADvendio__ConnectedItem__c = null",
         "variant":"neutral",
         "isActive":"false"
      },
      {
         "title":"Don't Show Optimized Item",
         "labelcustomLabel":"Don't Show Optimized ItemDontShowOptimized",
         "namespaceLabel":"ADvendio",
         "filter":"ADvendio__OptimizationExclusion__c = null",
         "variant":"neutral",
         "isActive":"true"
      }
   ]
}

...

  • title: sets the text for the mouse over

  • label: is shown on the button and

  • customLabel: allows you to connect the button to a custom label to show different translations depending on your language

  • define the filter values. You can add multiple using brackets. 

...

Feature Name

Feature Setting Name

Feature Setting Name

CampaignItemRelatedList

ActionButtons

Code Block
{
      "Buttons":[
   {
               {
         "title":"Add Items",
         "label         "customLabel":"Add Items",
         AddItemsOptimizerButton",
         "namespaceLabel":"ADvendio",
         "action":"/apex/ADvendio__SelectSearch?Id=$mcId$",
         
         "type":"vf"
            },
      {
               {
         "title":"Change Items",
         "labelEdit Items",
         "customLabel":"EditItemsOptimizerButton",
         "namespaceLabel":"ADvendio",
         "action":"/apex/ADvendio__MediaConfiguration?id=$mcId$&selected=$recordIds$",
         "type":"vf"
      },
      {
         "title":"Change Items",
         
         "customLabel":"ChangeItems",
         "namespaceLabel":"ADvendio",
         "componentDefinition":{
            
            "componentDef":"ADvendio:campaignBuilderWrapper",
            
            "attributes":{
               
               "mode":"edititems",
               
               "recordId":"$mcId$",
               
               "campaignItemIds":"$recordIds$"
            }
         },
         
            }
         },
         "type":"lwc"
            },
      {
         
      {
         "title":"EditOptimize Items",
         "label
         "customLabel":"Edit ItemsOptimizeItems",
         "action
         "namespaceLabel":"/apex/ADvendio__MediaConfiguration?id=$mcId$&selected=$recordIds$",
         "type":"vf"
      },
      {
         "title":"Optimize Items",
         "label":"Optimize Items",
         
         "action":"/apex/ADvendio__NavigateToOptimizer?id=$mcId$&selected=$recordIds$",
         
         "type":"vf"
            },
      {
         
      {
         "title":"Delete Items",
         "label":"Delete Items",
         
         "customLabel":"DeleteItems",
         "namespaceLabel":"ADvendio",
         "action":"/apex/ADvendio__DeleteCampaignItems?id=$mcId$&selectedIds=$recordIds$",
         
         "type":"vf"
            },
            {
                  "title":"Sort Items",
         "label
         "customLabel":"Sort Items",
         SortCampaignItems",
         "namespaceLabel":"ADvendio",
         "action":"/apex/ADvendio__SortCampaignItems?Id=$mcId$",
         
         "type":"vf"
            },
      {
         
      {
         "title":"ShowCheck RecommendationsAvailability",
         "label         "customLabel":"Show RecommendationsCheckAvailability",
         "action
         "namespaceLabel":"/apex/ADvendio__ProductRecomm?id=$mcId$",
         "type":"vf"
      },
      {
         "title":"Check Availability",
         "label":"Check Availability",
                  "action":"/apex/ADvendio__CheckAvailabilityCi?id=$mcId$&selectedIds=$recordIds$",
                  "type":"vf"
      
      },
           {
          {
         "title":"Submit to AdServer",
         "label":"Submit to AdServer",
         "action":"/apex/ADvendio__SubmitToAdServer?id=$mcId$&selectedIds=$recordIds$",
         "type":"vf"
      },
      {
         "title":"Creative Upload",
         "label":"Creative Upload",
         
         "customLabel":"SubmitToAdServer",
         "namespaceLabel":"ADvendio",
         "action":"/apex/ADvendio__CreativeUploadCiSubmitToAdServer?id=$mcId$&selectedIds=$recordIds$",
         
         "type":"vf"
            },
            {
                  "title":"Update Ad-Status in AdServer",
         "label         "customLabel":"Update Ad-Status in AdServer",
         "UpdateAdServerStatus",
         "namespaceLabel":"ADvendio",
         "action":"/apex/ADvendio__UpdateAdServerAdStatus?id=$mcId$&selectedIds=$recordIds$",
                  "type":"vf"
            },
      {
               {
         "title":"Get Delivered Clicks/Impressions",
         "label
         "customLabel":"Get Delivered Clicks/Impressions",
         DeliveredClicksImpressions",
         "namespaceLabel":"ADvendio",
         "action":"/apex/ADvendio__DeliveredClicksAndImpressionsImport?id=$mcId$&selectedIds=$recordIds$",
                  "type":"vf"
           }
      ]
}

This entry in JSON format as an array of map objects is used to define the default action buttons, where we can define the

  • title,

  • label and

  • customLabel (to show different translations depending on your language)

  • action values.

The parameters must be defined as $mcid$ for the Media Campaign Id value and $recordIds$ for the selected items to use according the button choice. Currently ADvendio offers 12 buttons the same as the Salesforce Campaign Item default feature.

...

  1. For Visualforce Pages:

    1. Create your Visualforce Page with an Apex Controller and add it to the Feature Setting as described below. Replace “vfExamplePage“ with the name you applied for the page:

    2. Add Button to Campaign Items:

      1. Go to Feature Setting (ActionButtons → CampaignItemRelatedList) and edit it.

      2. Add the value below: (info) You can change “title” and “label” based on your needs:

        Code Block
        {
         "title": "Example Page",
         "label": "Example VF",
         "action": "/apex/vfExamplePage?hello=$recordIds$",
         "type": "vf"
        }
  2. Create your LWC and add it to the Feature Setting as described below. Replace “lwcExample“ with the name you applied for the page:

    1. Add Button to Campaign Items:

      • Go to Feature Setting (ActionButtons → CampaignItemRelatedList) and edit it.

      • Add the value below: (info) You can change “title” and “label” based on your needs:

        Code Block
        {
         "title": "Example LWC",
         "label": "Example LWC",
         "componentDefinition": {
                "componentDef": "Cc:lwcExample",
                "attributes": {
                  "name": "$recordIds$"
                }
              },
         "type": "lwc"
        }

...