How to Hide/Show Field Based on Record’s View?

How to Hide/Show Field Based on Record’s View?

In this blog, we will learn how to hide/show a particular field based on the view’s condition. We can do this by using business rules.

Here Contact is an entity. Is Product (Yes/No), Product Detail these 2 are fields of contact. if the contact has a product, show the product detail else, hide the product detail. Is Product field will be Yes if the contact has a product otherwise, it will be false.

Below are the steps to create a business rule to hide/show product detail.

Step 1: Navigate to Settings > Customization > Customize the System.

  • Click on Customize the System; it will open a pop-up.
Records View-1

Step 2: Click on Entity and open Contact entity. And click on the Business Rules to create a new one.

Records View-2

Step 3: Configure the Business rule.

  • Business Rule: Give a proper name to the business rule.
  • Description: Write an appropriate description of the business rule.
Records View-3

A. First we will check whether Is Product is True or False. So for that, click on Condition in the properties and set a property that if Is Product is true.

  • Display Name: Write the display name of the condition.
  • Entity: Select contact entity.

Now set the rule.

  • Source: Select Entity.
  • Field: Select the field on which you want to check the condition here, we choose Is Product.
  • Operator: Select Equal
  • Type: Select Value
  • Value: Yes (Provide the value of the field)

Now click on Apply. It will look like the below image.

Records View-4

  • Now set action if the condition is true or false.
  • So if Is Product is true, then set the action to show product detail, and if Is Product is false, then hide Product detail.

B. Drag Action (Set Visibility) to the correct and cross icon as highlighted in the below image.

Records View-5

Now Set Visibility in both cases of Is product is true or false.

i) If the Product is true, show product detail

  • Set visibility as shown in the below image and click on Apply.
Records View-6

ii) If the Product is false, hide the product detail

  • Set visibility as shown in the below image and click on Apply.
Records View-7

So after setting conditions and actions, it will look like as below.

Records View-8

C. Save and Activate the business rule.

Records View-9

Now on every record of contact based on condition, it will hide/show the product description.

So this is how users can create business rules to hide/show particular fields based on any conditions.

 

All product and company names are trademarks™, registered® or copyright© trademarks of their respective holders. Use of them does not imply any affiliation with or endorsement by them.

Riddhi Faldu

Riddhi Faldu

Riddhi is a firm believer of serenity and writing is something that keeps her grounded. Being a Computer Engineer by qualification, understanding and writing about tech comes to her naturally. It wouldn't be wrong to call her diligent as she likes pushing herself and others to bring the best on table. In leisure time, she likes practicing calligraphy and wishes to master the beautiful concoction of ink and words.

Read Related Blogs About Dynamics 365 Portal

How to Clear the Cache in the Power Apps Portal

How to Clear the Cache in the Power Apps Portal

3 Min
Revolutionizing Financial Services with Dynamics 365 Customer Portal

Revolutionizing Financial Services with Dynamics 365 Customer Portal

5 Min
Why You Need D365 Developers in Your Team

Why You Need D365 Developers in Your Team

4 Min
To Top