How to hide the control and its description in Dynamics Portal / Adx Studio ??

Happy to connect with you all through this blog.

Let’s jump to this topic,

Generally, we use JavaScript and Jquery in the custom JavaScript section to show/hide the fields. we need to hide two controls one is label and one is data control. So get the id of field name and label name place it in the below script to hide and show it.

This snippet will help you to do that.

Show the field: $("#elementname").show()
Hide the field: $("#elementname").hide()

What’s new ?  Yeah I have something new for you.  If we are using the description property in Dynamics Portal and we are displaying above the label or above the field or below the field.  If we need to hide this field dynamically, how to do?

Simplest approach is to hide the columns. Portal will render the field as table row and columns. So need to find the fields column and hide it. Whats the benefit? It will hide the label, data control and description associated with this control/field. There is no need to do that one by one.  Here is the snippet for it.

Show the field column: $("#elementname").parent().parent().show()
Hide the field column: $("#elementname").parent().parent().hide()

I believe this snippet will help someone in the need.

If you need any help on Dynamics project and training, reach out to me. I am happy to assist all the time.

Do connect with me on LinkedIn and follow this blog to know more about Dynamics and its related stuffs

Happy to connect with you all through blogging. Do share me your feedback.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: