Scenario Overview
In this business scenario we needed to support a business rule where any newly created products are automatically added to all price lists in the CRM system.
This formula will automatically find any active Price Lists in CRM and added your new Product to them.
North52 Decision Suite Solution
The North52 Decision Suite solution works like this:
- A formula of type 'Save - Perform Action' set up on the Product entity
- When the new Product is created the formula will retrieve all active Price Lists and add an appropriate Price List Item to them
North52 Decision Suite Steps
The following set of steps outline how to create this Formula:
- Create a new formula of type 'Save - Perform Action'
- Set the Source Entity to 'Product'
- Set the Mode to 'Server Side' and the Event to 'Create'
- Copy and paste the formula below into the formula
- Click save and test
Formula
ForEachRecord(
FindRecords('pricelevel',
'statecode', '0',
'pricelevelid'),
CreateRecord('productpricelevel',
SetAttributeLookup('uomid', 'uom' ,[product.defaultuomid]),
SetAttributeLookup('pricelevelid',
'pricelevel',
CurrentRecord('pricelevelid')
),
SetAttributeLookup('productid', 'product' ,[product.productid])
)
)
Wizard - FindRecords
Please see below the wizard you can use to create the FindRecords() function call used in this formula.
Note for the Equals Value , you will need to search in the Source tab.