Get a list of all Business Rules from your CRM environment

Referencing to the original post on CRM 2013 from here.

As Business Rules are created for a particular entity, we can see all the business rules that have been created for any particular entity from the entity customization itself.

This is ok when we need to see all the business rules on an entity. But it does not allow us to pull up a list of business rules across the whole system. Sometimes after deploying a solution, we need to check the business rules to make sure they’re activated, or if there are any errors, and we don’t want to have to go through each entity and check these.

As Business Rules are workflows under the hood, we can do an Advanced Find query with filter criteria on Categories as Business Rule (for CRM 2013, it was PBL) to get the list of all business rules in an organization. The result contains Name, Primary Entity, status and other basic information about the business rule.

p1

p2

 

Advertisements

Trigger Business Rules from Business Process Flow – CRM 2016

Though we did had both Business Rules and Business Process Flow in CRM 2015 as well, but there was no way to invoke a Business Rule for some action happening on Business Process Flow. Thus if I was required to perform a simple operation of locking a case type field when case stage changes to Research, I was required to have a JavaScript instead of using a no code approach of using business rules.

But now these kind of requests can be achieved using combination of business process flow and business rule. While creating a Business Rule, we have an option under ‘Field’ to select a ‘Business Process’. This allows two kinds of checks to be performed:

  1. Check for what business process flow is being used.

  2. Check based on field stage (Active/Selected) of business process flow.

This helps in completing above mentioned scenario and similar other requirements without writing a JavaScript.