Scenario Overview

Our business requirement is that when a user Qualifys a Lead record and an Opportunity gets created, we need to move any notes that users entered on the Lead entity across on to the Opportunity.

In our example our users have access to Leads but not Opportunities

They will not be able to make the changes required on an Opportunity so we will execute this formula as the Admin account to allow for the specific changes to occur. 

North52 Decision Suite Solution

The North52 Decision Suite solution works like this,

  • Whenever an Opportunity with an Originating Lead is created, the formula is triggered
  • The formula will first retrieve all notes related to the Lead
  • Then it will change the reference guid (i.e. Move) the Note from the Lead to the Opportunity

North52 Decision Suite Steps

The following set of steps assumes you are just using the out of the box Dynamics 365 setup. But its easy to enhance if you have extra fields/requirements.

  • Create a new formula of type 'Save - Perform Action'
  • Set the Event field to just 'Create'
  • Set the Source Entity to 'Opportunity'
  • Set the Source Entity Property to 'Originating Lead'
  • Under Deployment Settings , set Execute As to 'System User (Administrator)'
  • Copy and paste the formula below into the formula description field and click Save
  • You are ready to test


if( ContainsData([opportunity.originatingleadid]), 


                               SetAttributeLookup('objectid', 'opportunity', [opportunity.opportunityid]))

, 'NoOp')

Wizard - FindRecords

Please see below the wizard you can use to create the FindRecords() function call used in this formula. 

Note to find the value for Entity Name, you need to select "Note" and for the Where attribute, select Regarding. 

For the Equals Value, you will need to select Originating Lead from the Source tab.

Did you know?

North52 has a powerful distributed cache for advanced decision logic

xCache allows you to configure and scale your Dynamics 365/CRM applications running On-Premise or Online. It allows dynamic system configuration and removes performance bottlenecks related to data storage. xCache provides Dynamics 365/CRM with an extremely fast and scalable distributed cache to power your advanced decision logic.

xCache in Dynamics 365  lets you cache static application data, and also load dynamic cache items for applications running in a single or multi-server configuration.

Learn more and see examples of xCache