Views:

Scenario Overview


In this scenario our business requirement is that when a user creates a new Opportunity in the CRM system, a Currency-based default Price List is automatically set. 

[Set the price List Lookup on create event of a new Opportunity]

N52 Formula Manager Solution

The Formula Manager solution works like this:

  • We create a server-side only Decision Table that fires for just when a Opportunity gets created and the PriceList isn't filled in by the User
  • This Decision Table will check to see if an Account has been associated with this Opportunity
  • If there is no Account, the Decision Table defaults to Default Pricelist
  • If there is an Account associated , the Decision Table will check for that Account's Currency
  • The Decision Table will then set the PriceList based off the Account's Currency .

N52 Formula Manager Steps

 

Note : The PriceLists need to be set up prior to creation of this Decision Table. For this example, the Price Lists "Bicycle PriceList - in Euros" , "Bicycle PriceList - in USD" and " "Bicycle PriceList - in Sterling" have been created.

Setup

  • Create a new formula of type Save - Perform Action
  • Set the Event to 'Create'
  • Set the Source Entity to 'Opportunity'
  • Set the Source Property to 'All Properties'
  • If not already in Decision Table mode, click on Commands and select Toggle Editor to open the Decision Table editor
  • Right-Click the Condition column and select Insert Condition.

Set PriceList to Euros

  • Click on cell A2 and then open the Source tab
  • Search for 'Price' and expand the Source node
  • Select Price List (Value)
  • Click on cell A4 and open the Function tab
  • Search for 'doesnot'
  • Ctrl + Click the function DoesNotContainData 
  • Click on cell B2 
  • Go to the Source tab, clear the search field
  • Expand the tree node Related (N : 1)  > account (parentaccountid) > (Attributes)
  • Search for 'currency'
  • Select Currency (Name)
  • Click on B4 and Type 'Euro'  
  • Click on C2 and go to the Source tab
  • Search for 'Price' and expand the Source node
  • Select Price List (Value)
  • Click on C4 and open the Function tab
  • Search for 'findvalue'
  • Shift + Click FindValue to open up its wizard:
    • Friendly Name: enter 'Set Euro PriceList'

    • Entity Name: find and select Price List

    • Where Attribute: find and select Name

    • Equals Value: enter 'Bicycle Pricelist - in Euros' 

    • Select Attribute: find and select Price List

    • Click Generate

 

Set PriceList to U.S. Dollars / Set PriceList to Sterling

  • Click on cell A5
  • Open up the Function tab  and search for 'doesnot' 
  • Ctrl + Click the function DoesNotContainData 
  • Click on cell A6
  • Ctrl + Click the function DoesNotContainData   
  • Click on cell B5
  • Type 'Pound Sterling'
  • Click on cell B6
  • Type 'US Dollar'
  • Click on cell C5
  • Click on the Functions tab.
  • Search for 'findvalue'
  • Shift + Click FindValue to open up its wizard:
    • Friendly Name: enter 'Set Sterling PriceList'

    • Entity Name: find and select Price List

    • Where Attribute: find and select Name

    • Equals Value: enter 'Bicycle Pricelist - in Sterling'

    • Select Attribute: find and select Price List

    • Click Generate

  • Click on cell D6
  • Click on the Functions tab
  • Search for 'findvalue'
  • Shift + Click FindValue to open up its wizard:
    • Friendly Name: enter 'Set USD PriceList' 

    • Entity Name: find and select Price List

    • Where Attribute: find and select Name

    • Equals Value: enter 'Bicycle Pricelist - in USD'  * 

    • Select Attribute: find and select Price List

    • Click Generate

  • Your Decision Table should look like below:

                               
 

Did you know?

Quality Dynamics 365 Projects are Delivered Faster with TestShield

Deliver fully tested Dynamics processes earlier and at less cost. Product owners, testers and developers collaborate easily, delivering fully tested systems in short sprints.

  1. Model
    • Accurately capture test data in visually in Excel like sheets
  2. Generate
    • Create perfect automated tests with data and execute on a schedule or within your Azure DevOps pipelines
  3. Maintain
    • Quickly update easy-to-use spreadsheets to maintain tests

Learn more about TestShield