In this scenario you need to implement a business rule that will change the business process flow & stage on the opportunity entity when the estimated revenue of the Opportunity is set to less than $1,000.
You can use this example to perform either of the two actions,
- Change the Business Process Flow & the Stage
- Just change the Stage of the current Business Process Flow
Note1 : If you are using CRM 2015 Update 1 or higher you will need to also set the field named traversdpath in order to get this to work correctly
Note2 : If you are using CRM 8.0+ or above do not use this KB article as it no longer applied. Instead look at these KB articles ,
N52 Formula Manager Solution
The Formula Manager solution works like this,
- Use the FindValue() function to lookup the guid of the required business process flow
- Use the FindValue() function to lookup the guid of the stage
- Use the UpdateRecord() function to update the opportunity record with the 2 guids from above
- The formula type is set to Process Genie so we can call the formula from a wortkflow
N52 Formula Manager Steps
The following set of steps outline how to create this Formula
- Create a new formula of type 'Process Genie'
- Set the Source Entity to 'Opportunity'
- Copy & paste the formula below into the formula description field & click save
- Create a new workflow within CRM where you add a condition to check that the estimated revenue is less that $1,000.
- If it is less than $1,000 then use the custom workflow activity 'N52 Process Genie' to call the formula by passing in the short code from the formula. See the screenshot below for how this is setup.
- You can now test this on the Opportunity entity.
UpdateRecord( 'opportunity', [opportunity.opportunityid], SetAttribute('processid', FindValue('workflow', SetFindAnd('name', 'statecode'), SetFindAnd('QuickOpportunityProcess', '1'), 'workflowid' ) ), SetAttribute('stageid', FindValue('processstage', SetFindAnd('processid', 'stagename'), SetFindAnd(FindValue('workflow', SetFindAnd('name', 'statecode'), SetFindAnd('QuickOpportunityProcess', '1'), 'workflowid' ), 'Qualify'), 'processstageid' ) ) )
Did you know?
Over 300 customers use North52!
Join over 300 organizations worldwide who trust North52 to drive their digital transformation into the future:
Serious Power without Code: Easily build business rules, tests and data packages using our point-and-click editors. Even the most complex business rules are easily configured.
Build Fast: We’ve built the North52 tools with our user’s productivity in mind – up to 10x faster than writing custom code.
Awesome Support: We take pride in providing world class support to our customers and partners, ensuring you are successful with North52.
Future Proof: We ensure your business rules and tests that you configure today, will continue to work with the ever changing Dynamics 365 platform.