Back to Basics # 13: Business Rules with Actions Set Business Required/Visibility in Model Driven Power Apps

Introduction:

In Dynamics 365 CRM or Power Platform, Business rules provide a simple interface to implement and maintain fast-changing and commonly used rules to set and clear field values,set field requirement levels,show or hide fields ,Enable or Disable fields,validate and show error messages Every business rule will have components and properties. And every component will have Actions and Flow[Condition]. Every business rule starts with a condition. In this article we are going to see about 2 Actions Set Business Required and Visibility with a business scenario on contact entity

Step 1:

Login to the required Dynamics CRM/ Power Apps environment using URL make.powerapps.com by providing user name and password as shown in the below figure.

Step 2:

Create a solution with the required entity/table to create a business rule , if you want to know about how to create a solution , you can refer here and select the solution as shown in the below figure.

Step 3:

Open ContactCustomiazations solution  and click on entity/table contact  as shown in the below figure.

Step 4:

After Step 3, go to contact entity/table and then create below custom (user defined)columns as shown in the below figure.

Step 5:

After Step 4, click on Business rules  and then click on Add business rule as shown in the below figure.

Step 6:

After Step 5, a new tab gets opened, provide Business rule name and relevant Description and keep Scope as Entity by default and click on save  as shown in the below figure.

Step 7:

After Step 6, you will encounter validation Failed!  shown in the below figure.

Step 8:

After Step 7, Provide Condition Name and select field Birthday custom field and operator Contains Data and click on Apply shown in the below figure.

Step 9:

After Step 8, still we see 1 validation error . Now we have to provide 2 Business Required Actions from Actions Section and have to drag and drop Action and give it to true and false part of Condition and provide values as shown in the right side of the window and click on Apply you should see validation error goes off as shown in the below figure.

Step 10:

After Step 9, now take another Action Set Visibility and then drag and drop to the right side of Set Business Required If Birthday have Value as shown in the below figure.

Step 11:

After Step 10, as 1 validation failed error is shown at the top and another at the top of Set Visibility New Action, click on Set Visibility Action and provide field Discount and give Visible value as Yes and click on Apply as shown in the below figure.

Step 12:

After Step 11, provide Set Visibility Action to both Set Business Required Actions in Step 9 and click on Apply you could see validation successful message as well as shown in the below figure.

Step 13:

After Step 12,click on Save Button and click on Activate button of Business Rule window and and close it and go to solution and publish it  as shown in the below figure.

Step 14:

After Step 13,open new contact record and select Information form from Contact Dropdown  and set Birthdate and see Vaccination Field as required Field and Discount  field will be also shown as shown in the below figure.

Step 15:

After Step 14,in the same way if we make Birthday Field as empty, then Vaccination field will become not Business Required or non Mandatory and Discount field get’s hidden as shown in the below figure.

Note:

  1. Please make sure you keep the required fields on Contact Form.
  2. Select fields for Actions as well as for Conditions without fail.
  3. Make sure to Activate Business Rule after save.
  4. Publish all changes without fail.
  5. Give name of conditions and Actions names in a meaningful way.

Conclusion:  In this way one can easily perform commonly used Business rules with Set Business Required and Visibility Actions in few minutes can be built.

One thought on “Back to Basics # 13: Business Rules with Actions Set Business Required/Visibility in Model Driven Power Apps

  1. Pingback: Rewind July 2021 – Common Man Tips for Power Platform, Dynamics CRM,Azure

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s