Views:

Scenario Overview

In this scenario we needed the ability to have a button placed on the Marketing List form that would remove all contact members from the current marketing list. The screenshot below shows how this button would appear on the form.
 

N52 Formula Manager Solution

The Formula Manager solution works like this,

  • A formula of type 'ClientSide Calculation' is created to perform the desired action
  • A North52 Quick Button is placed on the Marketing List form **
  • When the button is clicked the formula will execute

** Instructions on how to add the button to the form are at this link.
   

N52 Formula Manager Steps

The following set of steps outline how to create this Formula

  • Create a new formula of type 'ClientSide Calculation'
  • Set the Source Entity to 'Marketing List'
  • Set the Mode to 'Client Side'
  • Copy & paste the formula below into the formula 
  • Click save & test

Formula

  ForEachRecord(

          FindRecords('listmember', 'listid', ToString(FindValue('list',
                                                                'listname', 
                                                                [list.listname]  ,
                                                                'listid')), 
                                                                'entityid'), 

           DisAssociateEntities('list', 
                                 FindValue('list', 'listname', [list.listname], 'listid'), 
                                'contact'  , 
                                CurrentRecord('entityid'),
                               'listcontact_association') 

           )

Configuration of the HTML WebResource 'Quick Button' on the Marketing List form

Wizard - DisAssociateEntities

Please see below the wizard you can use to create the DisAssociateEntities() function call used in this formula. 

Note to find the value for Entity Name Left , you will need to search for "Marketing " . 

For Record ID Left , please copy and paste "FindValue('list', 'listname', [list.listname], 'listid') " 

For Record ID Right , please copy and paste "CurrentRecord('entityid')