web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Suggested Answer

Hide Field when another Field is blank

(0) ShareShare
ReportReport
Posted on by 137

Hi Expert,

I have two fields with same logical name but different label name in my Contact Form, see the screenshot as below

Hide-Field.JPG

When the Client Number field is blank, I hope the Client Link field to be hided. How can I do it. I try the Buz rule, it's not work.

Any achievements or suggestions are welcomed and appreciated. 

I have the same question (0)
  • empath-e CRM Profile Picture
    1,136 on at

    Can you screenshot the Business Rule you tried and post it in here as it should work fine. I assume you activated it?

  • Suggested answer
    Bipin D365 Profile Picture
    28,985 Moderator on at

    Hi,

    What is the idea behind using same field for two purpose?

    If you create different field for Client Link, it will be easy and should work with business rule.

    Please mark my answer verified if this is helpful!

    Regards,

    Bipin Kumar

    Follow my Blog: xrmdynamicscrm.wordpress.com/

  • FOR365 Profile Picture
    137 on at

    Thank you for your reply.

    Using same field with different label, since I need to set up custom control in one of field ( custom control you can reference: pcf.gallery/.../).

    But the requirement is when the Client Number field is blank, Client Link field would be hided.

    Please give me advice.

  • Suggested answer
    Bipin D365 Profile Picture
    28,985 Moderator on at

    Hi,

    Try using Javascript.

    When you place same field multiple times of the form, you can access other instance of field by adding 1,2 in field schema name.

    So for your case you can access Client Number with - prefix_clientnumber and Client Link with - prefix_clientnumber1

    function HideClientLink(executionContext)

    {

    var formContext=executionContext.getFormContext();

    var clientNumber=formContext.getAttribute("new_clientnumber").getValue();

    var clientLink=formContext.getControl("new_clientnumber1");

    if(clientNumber==null || clientNumber=="")

    {

    clientLink.setVisible(false);

    }

    else

    {

    clientLink.setVisible(true);

    }

    }

    Add your function on Onload of Form and Onchange of Client Number field.

    Please mark my answer verified if this is helpful!

    Regards,

    Bipin Kumar

    Follow my Blog: xrmdynamicscrm.wordpress.com/

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
ManoVerse Profile Picture

ManoVerse 130 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 117

#3
Muhammad Shahzad Shafique Profile Picture

Muhammad Shahzad Sh... 69 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans