Views:

Scenario Overview

Our business requirement is that when a user Qualify's a Lead record & an Opportunity gets created we need to move  any notes that users entered on the Lead entity across on to the Opportunity.

North52 Decision Suite Solution

The North52 Decision Suite solution works like this,

  • It detects that when a new Opportunity is created if it has an Originating Lead ID 
  • If yes 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 'Originating Lead'
  • Copy & paste the formula below into the formula description field & click save
  • You are ready to test

Formula

if( ContainsData([opportunity.originatingleadid]), 

     ForEachRecord(

         FindRecords('annotation', 'objectid', [opportunity.originatingleadid], 'annotationid'), 

         UpdateRecord('annotation', 
                               CurrentRecord('annotationid'),
                               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 tick "Note " and for the Where attribute , tick Regarding 
For the Equals Value, you will need to select Source > Originating Lead 

  

Did you know?

You can easily build Fast and Accurate automated Tests with TestShield

No scripting or development is required. Our point and click editor enables non-coders to build automated tests for Dynamics 365 much faster and easier than traditional automated testing systems. 

Test Data and rules are stored in easy to maintain Excel-like sheets making it fast and easy to learn how to use TestShield.

Learn more about TestShield