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.

N52 Formula Manager Solution

The Formula Manager 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


                  

N52 Formula Manager Steps

The following set of steps assumes you are just using the out of the box Dynamics CRM 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