Enforcing business rules

For this recipe, we will focus on a different entity. Let's have a look at Opportunity. The Opportunity is the result of a qualified lead in many cases, but Dynamics CRM allows you to also add opportunities directly.

With opportunities, one of the fields we will focus on is the pipeline phase. For specific scenarios, a pipeline phase is tracked, customized, and enforced. Business rules can define the stages that define each pipeline phase, and specific rules that have to be met for an opportunity to progress to the next pipeline phase.

Getting ready

We can start by either reusing one of the previously created solutions or creating a new one. If you do not have a solution created, start by creating one.

How to do it...

We ...

Get Microsoft Dynamics CRM 2011 Scripting Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.