top of page

Creating your first CRM Business Rule

  • Writer: Ryan Redmond
    Ryan Redmond
  • Dec 5, 2022
  • 4 min read

Updated: Jun 5

Step-by-step guide illustrating how to create a CRM business rule using Microsoft Power Platform, featuring detailed steps, diagrams, and instructional text.

In Microsoft Power Platform and Dynamics CRM, Business rules are a No-Code way of automating form behavior.


You can combine conditions and actions to show or hide fields, set requirement levels, validate data, and show error messages. The YouTube video shows an Opportunity business rule in action that validates the Est. Close Date to be in the future.


This blog outlines the steps to build this business rule using the Power Platform.



Steps to Building a CRM Business Rule


Step 1: Use a Solution


Login to https://make.powerapps.com and make sure to (#1) select the environment that you want to modify.


Then, (#2) either use a solution that you have already started or create a new solution. We are going to focus on the Opportunity, so I’ve created a Solution called “Opportunity”.


Power Apps interface showing Solutions list. Steps 1 and 2 guide on selecting an environment and making a solution. Highlighted: "Opportunity".

Power Apps Solutions


Step 2: Add Opportunity Table to your Solution


Inside your solution, use the “Add Existing” option to add the existing Opportunity Table. Once you have added the opportunity table, your solution will look like the image below:


Power Apps interface showing "Opportunity" table details with columns for schema and data, set in a purple-themed dashboard.

Step 3:  Create a new formula field for the current date time


Formula fields are a new data type available in Power Platform – I’m so excited. I suspect that this new field type will get lots of use and attention in the future.

For the Opportunity Table, create a new formula field. Click on Columns on the left navigation and select “+New Column”.


Enter the column name (“UTC Now”), the description, select “Formula” as the Data Type and then enter the formula “UTCNow” in the formula field as shown in the image below.


Note that at the time of this blog, the Formula functionality is currently in preview.


Power Apps interface showing column creation. Instructions: 1. Click "+New Column" 2. Enter formula info for "UTC Now".

Add a new Formula Field to Dynamics


Step 4: Create Business Rule


Next, Create a new business rule on the Opportunity table. From your solution, click the Opportunity Table and then click (#!) “Business Rules” on the side navigation.


Then, click (#2) “+ New Business Rule” on the menu as shown in the image below.


Power Apps interface showing steps to create a new business rule. Blue arrows highlight "Business Rules" and "+New Business Rule," with a purple header.

Create a new Power Apps Business Rule


Step 5: Add a Condition to your Business Rule

Each business rule needs to start with a condition. The condition for our

business rule will use the new UTC Date field that we created in Step 3.


Our business rule’s Condition will have the following values:


  • Display Name: Est. Close Date < Now

  • Entity: Opportunity

  • Source: Entity

  • Field: Est. Close Date

  • Operator: Is less than

  • Type: Formula

  • Field: UTCNow

  • Operator: +

  • Type: Value

  • Days: 0


If everything was set correctly on your condition, the Condition Expression should now read “(Est. Close Date is less than [UTCNow +0])”


Power Apps screen showing a flowchart with "Condition" and "Show Error Message" steps. Properties panel visible on the right.

Power Platform Business Rules Condition


Step 6: Add Error Message to your Business Rule


The business rule Action is where the rubber hits the road.

For our example, we are going to use an error message Action which will be displayed to the user. 


This way, the user has to fix the Est. Close Date prior to leaving the record.

Our Show Error Message Action will have the following values:


  • Display Name: Est. Close Error Message

  • Entity: Opportunity

  • Error Message (Field): Est. Close Date

  • Error Message (Text): “Estimated Close Date is in the Past”


If everything was set correctly on your Action, the Action should look similar to the image below:


Power Apps screen shows a flowchart validating an estimated close date. Error message setup says "Estimated Close Date is in the past!"

Power Apps Business Rule - Show Error Message


Step 7: Save and Activate your Business Rule


We are just finishing things up now. If you have completed the steps above, then you should “Save” the business rule and make sure you “Activate” it from the menu.


Once you get back to your solution, make sure that you “Publish all Customizations” for your solution.


The last step will be to test out your business rule. To do this just open the Opportunity in Dynamics CRM and look for the Est. Close Date.


If your date value is in the past, note the error message that you created with a business rule is displayed.


CRM dashboard screenshot showing a project for Café Duo Espresso Machines. Error message in red: "Est. Close Date is in the past!"

Dynamics CRM Business Rule validates Est. Close Date Business Rules are a no-code way of automating your form behavior. This step-by-step tutorial showed a very simple but useful example of how a business rule can help guide users to keep the system data up to date.


More complex business rules can be built to display recommendations, lock/unlock fields, set field values, show/hide fields and more.


We offer an easy way to start automating your workflows. Check out our unique approach to support & maintenance - you will love our Optrua Care Plans.



Extend your team with Optrua CRM experts


Business rules are extremely useful when optimizing your CRM system to improve data quality and enhance business outcomes. If you would like some help with new business rules for your business, Contact Us.

 

 

About the Author

Photo of Ryan Redmond, the founder of Optrua, specializing in CRM

Ryan Redmond is the founder of Optrua, specializing in CRM and business process optimization. Ryan channeled his passion for efficiency from lessons learned in the Navy to his work today.

 

He helps businesses streamline technology to improve employee and customer experiences and empower teams to work smarter, not harder, without unnecessary overhead.

 

Connect with Ryan on LinkedIn.

Join the 10,000+ people who get CRM tips in their inbox every month.

You're all set to receive updates and valuable insights.

bottom of page