A new knowledge base article has been published on our support portal.
Scenario Overview
Note : This Article is for pre version 9 of CRM , since then Microsoft has given the Process Stages its own Entity. Note : This Article is for pre version 9 of CRM , since then Microsoft has given the Process Stages its own Entity.
This article is a follow on from xRM Formula #78. This enhanced scenario is the original business requirement plus now we must take into consideration the Budget value of the Opportunity before deciding what stakeholders are required based on the following rules,
- Budget < $100,000 - Requires: Decision Maker & Champion stakeholders
- Budget > $100,000 - Requires: Decision Maker, Champion & Economic Buyer stakeholders
This method is a further enhancement of #78 it because retrieves the required Stakeholders from xCache therefore separating the business rule (i.e. formula) completely from the configuration data. Like #78 we dynamically generate a fragment of the fetch-xml so that it can be dynamically injected into the main fetch-xml query.
N52 Formula Manager Solution
The Formula Manager solution works like this,
- A formula of type Validation is created
- It is configured so that it executes each time the Process Stage field changes on the Opportunity entity
- A SmartFlow function is used to allow us to execute multiple actions in the formula
- When executed it first checks if the Stage of the Opportunity is not currently Develop. If it is the formula exits.
- We set the list of required stakeholders depending on the budget in the Opportunity
- We build the FetchXML fragment using the xCache values and AppendFormat() function
- We determine how many stakeholders should be be present on the record
- Then we count how many actual stakeholders are on the Opportunity
- Finally we check if the actual count equals the required count and if not display an error message
North52 Formula
North52 xCache Records