8.5.4 Settings for the Custom Campaign Item Related List

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. 

Navigate to the App Launcher - Feature Setting.

Default Sorting

In version 2.148 a new feature setting was added to the sort order feature setting. As of now you are able to define the sort direction (ascending or descending) to customize the sorting of the list to fit you and your users needs.

Replace "Name" with any field API you like to default the sorting to. 

Feature Name

Feature Setting Name

default value

Feature Name

Feature Setting Name

default value

CampaignItemRelatedList

SortByField

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

Default Columns

Additionally, you can define individual columns for the component. Create new feature setting records in the following way:

Feature Name

Feature Setting Name

default value

Feature Name

Feature Setting Name

default value

CampaignItemRelatedList

TableFields

{ "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" ] }

This entry in JSON format as an array is used to define what fields from the CampaignItem object can be shown into the ResultTable. List API names of Campaign Item fields only. 

Create and manage Custom Buttons

To add a custom button which can filter your line items or to manage the ADvendio Custom Buttons

  • Don't Show Cancelled Items

  • Don't Show Optimized Items

on your visual force page please create a feature setting with the following values:

Feature Name

Feature Setting Name

Default Filter Value

Feature Name

Feature Setting Name

Default Filter Value

CampaignItemRelatedList

FilterButtons

{ "Buttons":[ { "title":"Don't Show Cancelled Item", "label":"Don't Show Cancelled Item", "filter":"ADvendio__ConnectedItem__c = null", "variant":"neutral", "isActive":"false" }, { "title":"Don't Show Optimized Item", "label":"Don't Show Optimized Item", "filter":"ADvendio__OptimizationExclusion__c = null", "variant":"neutral", "isActive":"true" } ] }

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

  • title: sets the text for the mouse over

  • label: is shown on the button and

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

By default the values are as above. They can be set as follows;

  • 'isActive' set to false, if the user should see the button disabled when opening the component. When 'is Active' is set to false, variant will be set to neutral, meaning the button appears as not selected 

  • 'isActive' set to true, if the user should see the button enabled when opening the component. When 'is Active' is set to true, variant will be set to brand, meaning the button appears blue/as selected by default

Create and manage Action Buttons

To modify the action buttons on the component create or edit the following feature setting: 

Feature Name

Feature Setting Name

Default Filter Value

Feature Name

Feature Setting Name

Default Filter Value

CampaignItemRelatedList

ActionButtons

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

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