Views:

Scenario Overview

In this scenario, we need to be able to check for an Accounts free time periods when needed. We will use the Appointments associated with this Account to measure its free time. 

North52 Decision Suite Solution

The North52 Decision Suite solution works like this:

  • A formula of type 'Process Genie' is created. 
  • A Quick Button is created on the Account and it is set up to trigger the formula
  • The Formula takes 2 custom fields - Start Time Check and End Time Check - and finds all free time periods between Appointments for this Account
  • It then outputs this result into the Description field.

Note 1: You will need to create the 2 custom fields beforehand. In this example, we named them new_starttimecheck and new_endtimecheck

North52 Decision Suite Steps  

The following set of steps outline how to create this Formula:

  • Create a new formula of type Process Genie
  • Set the Mode to Serverside
  • Set the Source Entity to Account
  • Go to the Formula editor
  • Copy and paste the formula below
  • Click Save


       

Formula

Smartflow (
  
  SetVar('EntityCollectionResult' ,
 	      TimePeriodsFindGaps(FindRecordsFD('All Appointments',
                                             'true',
                                             SetParams([account.accountid])),
   		  'scheduledstart',
   		  'scheduledend',
   	       [account.new_starttimecheck], 
  		  [account.new_endtimecheck])			
  			),


  UpdateRecord('account', 
               [account.accountid], 
                SetAttribute('description',
                              OutputtoTrace( GetVar('EntityCollectionResult' ))))
  
  )

Quick Button

Please see article  at this link for instructions on how to set up the quick button which will trigger this formula.

Did you know?

It is Faster, Easier and Smarter using North52

We help you deliver Dynamics 365 projects with complex decision logic/business rules:

FASTER.

Our no code business rules engine helps deliver CRM/CDS projects up to 10 times faster than using custom code.

EASIER.

Simple to use point-and-click interface to build simple or complex business rules.

SMARTER.

Lower your project risk and slash ongoing maintenance costs.

Learn more about the North52 Decision Suite