Scenario Overview 

In this scenario, we want our all Users with the Sales Manager role to be brought in automatically to important Opportunities

We will create a formula that adds our Sales Manager into the Team for any Opportunity that has an Est Revenue greater than 1 million euro. 

This formula will also remove our Sales Manager from this Team if the Est. Revenue goes below 1 million euro. 

Note 1: For this example you will need to have a team called Sales Manager setup beforehand. It will need to have the role Sales Manager given to it. 

North52 Decision Suite Solution

The North52 Decision Suite solution works like this:

  • A formula of type 'Save - Perform Action' is created on the Opportunity entity
  • This Formula will be triggered whenever an Opportunity is created or the Est. Revenue field is updated
  • The formula will add all Users with the Security Role 'Sales Manager' to the Team Access for the Opportunity record if the Est Revenue is greater than 1 million euros
  • It will also remove these Sales Managers if the Est Revenue goes below 1 million euros

North52 Decision Suite Steps

  • Create a new formula of type 'Save - Perform Action'
  • Set the Mode to 'Server Side'
  • Set Event to 'Create & Update'
  • Set Source Entity as 'Opportunity '
  • Set Source Property to 'Est. Revenue'
  • Click into the Formula Editor canvas
  • Copy and paste the formula below into the Formula Editor
  • Click Save
  • Click on the Fetch-Xml tab
  • Click the "+" symbol. 
  • For Name , enter "Find All users with Sales Manager Role"
  • For Query, please copy and past the Fetch XML below.
  • Click Save and Close.
  • You are now ready to test.



  If ([opportunity.estimatedvalue] > 1000000, 

     		    FindListValuesEx(FindRecordsFD('Find All users with Sales Manager Role'),

    RemoveUsersFromTeam( [], 
   		        FindListValuesEx(FindRecordsFD('Find All users with Sales Manager Role'),
  ) , 



<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="true">
  <entity name="systemuser">
    <attribute name="fullname" />
    <attribute name="businessunitid" />
    <attribute name="title" />
    <attribute name="address1_telephone1" />
    <attribute name="positionid" />
    <attribute name="systemuserid" />
    <order attribute="fullname" descending="false" />
    <link-entity name="systemuserroles" from="systemuserid" to="systemuserid" visible="false" intersect="true">
      <link-entity name="role" from="roleid" to="roleid" alias="ac">
        <filter type="and">
          <condition attribute="roleid" operator="eq" uiname="Sales Manager" uitype="role" value="{8BEDBFB8-0095-44B2-8990-616B86F06921}" />

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