Views:

Scenario Overview

In this scenario we are required to make a simple CSV list of all Product Line items associated with an Opportunitywhenever the Topic field is changed or whenever a Quick Button is clicked. We will save this list into the Description field for simplicity in this example.

N52 Formula Manager Solution

The Formula Manager solution works like this,

  • A formula of type 'Save - Perform Action' is created which triggers off both changes to a field Topic and clicking a Quick Button 
  • This formula creates a CSV list of all the Opportunity Products as a string variable
  • The formula then saves this variable to the Opportunity entity's Description field 

N52 Formula Manager Steps

Setup - Formula SetVarConcat

  • Create a new formula of type Save Perform Action
  • Set the Event to 'Create and Update'
  • Set Source Entity as 'Opportunity '
  • Set Source Property as 'Topic'
  • Click into the Formula Editor canvas
  • Copy and paste the formula below into the Formula Editor
  • Click Save

Now when you change the Topic in a Opportunity, the description will fill with a list of the Product Description (you may need to add a few  Product  Description  to see this ) 

Formula

 

SmartFlow(

  ForEachRecord(

    FindRecords('opportunityproduct',
                'opportunityid',
                [opportunity.opportunityid],
                SetFindSelect('productdescription') ,
                '50',
                'true'), 

    SetVarConcat('CSV List', 
                CurrentRecord('productdescription') + ',')
  ),

  UpdateRecord('opportunity',
          [opportunity.opportunityid],
          SetAttribute('description',Trim(GetVar('CSV List'),',') )
  ) 
) 

 

Setup - Quick Button

  • Create the Quick Button for this formula
  • Open the form designer of the Opportunity entity
  • Click on the Insert tab and click on Web Resource 
  • In the Web Resource field that appears, seach for "north52_quick_"
  • Select north52_quick_button_advanced_htm
  • Under Field Name and Properties, enter the name WebResource_SaveProductLinestoDescription
  • In the field Web Resources Properties > Custom Parameters(data) enter:

    "ShortCode

Did you know?

North52 Decision Suite helps streamline complex business processes

North52 Decision Suite is a cloud-based or on-premise decision management/decision engine platform for the Dynamics 365 and Power Platform that uses data, analytics and business rules to automate decisions.

Companies use North52 to streamline their processes, improve the quality of the decisions inside their Dynamics 365 systems, and shorten the time it takes to adjust to business and competitive changes.

Learn more about the North52 Decision Suite