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.
 

North52 Decision Suite Solution

The North52 Decision Suite 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.
   

North52 Decision Suite 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')

Did you know?

North52's Decision Suite has over 60 functions specifically for Client Side business rules

With over 60 functions for implementing client side business rules, North52 is likely to meet any of your client side specific requirements. From simple rules for showing and hiding form elements to complex rules for changing the way users work with Business Process Flows, the North52 business rules engine for Dynamics 365 has you covered.

Learn more about the range of  client side functions