Views:

Overview

When creating a record in Dataverse, you might need to set a specific Business Process Flow or not assign one at all, overriding the default out of the box behavior. In this article we show you how to achieve this easily using a North52 Decision Table.

Note: this will only work if the record (in our example the Opportunity record) is created via a plugin, workflow, API, or Power Automate Flow (i.e. not by a user via the User Interface). For further information see the Microsoft documentation.

Rules for Setting BPF on Opportunity

Rule #Description
1

When the Opportunity estimated revenue is equal to zero, do not show a business process flow.

2

When the Opportunity estimated revenue is between 1 and 100,000 show the Small Opportunity business process flow.

3

When the Opportunity estimated revenue is over 100,000 show the Large Opportunity business process flow.

North52 Decision Suite Solution

The North52 Decision Suite solution works like this:

  • A Formula is set up on the Opportunity table and triggers on the Create event:
    • Depending on the size of the Estimated Revenue value, the rules defined above are run
    • The BPF is either removed or specifically assigned

Set up Formula

  • Open the North52 App
  • Navigate to Business Process Activities > Formulas
  • Create a new formula, setting the following values in the Formula Guide:
    • Source Entity set to Opportunity
    • Set Formula Type to Save - Perform Action
    • Select the Decision Table editor
  • Change the Name of the formula to Opportunity - Set BPF on Create
  • Expand Deployment Settings on the Register tab
    • IMPORTANT!: Set the Pipeline Stage to Pre-Operation (Synchronous)
  • In the Condition column, select cell A2 and click on Est. Revenue from the Source tab
    • Enter your conditions in column A: A4 to A6
      • 0
      • ((1, 100000))
      • > 100000
  • In Action column select cell B2 and click on Process Id from the Source tab
    • To set the BPF update column B: B4 to B6:
      • '00000000-0000-0000-0000-000000000000' if you do not want to display a BPF at all
      • CreateEntityReference('n52demo_bpfsmallopportunity', '9dfc6819-a18b-ef11-ac20-7c1e52361f7d') to set the desired BPF
        • The first parameter is the schema name of the BPF table
        • The second parameter is the GUID of the BPF (you can get this easily from the URL when editing the BPF)
      • CreateEntityReference('n52demo_bpflargeopportunity', '0b30af66-7163-4ea8-9cca-f6e8e042c96e')
  • IMPORTANT!: Set the sheet options to use Target Entity
    • Right-click on the sheet, select Set Sheet Options > Use TargetEntity
  • Click Save

Business Rules Engine for Microsoft Dataverse - Decision Table - Set BPF on Create