Views:

Scenario Overview

 

In this scenario we will demonstrate how to set up a ClientSide Decision Table that you can to make multiple updates and changes to a form depending on various conditions.

For this article it is assumed that you have at least basic familiarity with Decision Tables and/or have read the following articles:

Note: We will not detail step-by-step instructions here on how to set up Conditions or Actions, please read the above articles if you need detailed configuration steps.

For this sample we will use Origin optionset on the Case entity. 

We have added the following to the Case form:

  • A Tab Called Social Media
  • A Section in this Tab called Facebook
  • A Section called Twitter
  • 4 Fields, 2 in Facebook Section and 2 and in the Twitter Section

The Business Rules

When the Origin Optionset is set to Twitter
  • Expand the Social Media Tab
  • Hide the Facebook Section
  • Make the Twitter name field mandatory
When the Origin Optionset is set to Facebook
  • Expand the Social Media Tab
  • Hide the Twitter Section
  • Make the Facebook User Profile field required
When the Origin Optionset is set to anything else 
  • Close the Social Media Tab
  • Hide the Facebook Section and the Twitter Section



 

North52 Decision Suite Solution

The North52 Decision Suite solution works like this:

  • Decision Table of type 'ClientSide - Perform Action' is created on the Case entity
  • The Source Property is set to 'Origin' and the 'OnLoad' event
  • The Event is set to 'Create & Update'
  • Exit on First Match is turned On (checked)

The Decision Table


 

Note: By naming the Action columns as ClientSide the Decision Table understands that we want to execute a ClientSide formula here against the form rather than against a specific field.  You can set the column name by right-clicking within the column to bring out the contextual menu, then select Set Action Column Options > Set ClientSide Action - see an example here.  

In the above example, when the Origin is set to Facebook the Decision Table will do the following:

  • Expand the Tab: Social Media
  • Show the Section: Facebook
  • Hide the Section Twitter
  • Set the Facebook User Profile as a Required Field
  • Set the Twitter Field as Not Required


Below you can see the the Decision Table in action. When the Origin is set to Facebook



When the Origin is set to Twitter




When the Origin is set to another Option  

Did you know?

About North52's four A’s of automated software testing

Assemble. Arrange. Act. Assert.®

TestShield is a testing solution for Dynamics 365/CRM which covers what we call the “four A’s of automated software testing“:

  • Assemble – describe the feature or process that you are testing using Gherkin language
  • Arrange – TestShield helps you automate the creation of test data – simply select from existing records plus their related records and TestShield will automatically arrange a ‘slice’ of your test data based on your selection
  • Act – easily define the processes you wish to trigger as part of your test
  • Assert – define the expected results

Learn more about TestShield