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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Customer Service forum

Can I use the entity-form-metadata to hide entity attributes on a page ?

(0) ShareShare
ReportReport
Posted on by

Hi,

I need to have attributes of an entity on my portal webpage, but only in javascript, so I want to hide it from the enduser (customer)

I hoped I could use the mechanism for meta data, but when I apply the ".d none" bootstrap css class, the attribute does not disappear.

https://community.adxstudio.com/products/adxstudio-portals/documentation/configuration-guide/entity-form/entity-form-metadata/

I kan make the attributes/fields disappear by changing this on the form level in CRM itself, but this causes the entire attribute/field attribute to disappear from the DOM (it does not get sent from the server at all) and I do need it (as mentioned) in my javascript.

Categories:
I have the same question (0)
  • Verified answer
    RaviKashyap Profile Picture
    55,410 Moderator on at

    Hi Michel,

    You could add the field sin the entity form and then hide it using javascript. Refer the below blog-

    dynamicsofdynamicscrm.com/.../dynamics-365-portal-code-tip-dynamically-showhide-field-based-on-another-field-on-entity-form

    Hope this helps.

  • Community Member Profile Picture
    on at

    Ok thanks, I will see how far I can get. Do you know a best practice for adding custom java-script in an entity form versus a web page ?

  • Suggested answer
    ReallyDeepBlue Profile Picture
    20 on at

    First of all, you were on the right track

    I was not able to find the bootstrap class you are looking for. There is, however, a .hidden class in the bootstrap.css file.

    So, in order to hide attributes on the portal form without losing them from the DOM you can do the following:

    1. add Entity Form Metadata for your attribute and set the CSS Class as hidden. Please note that there is no period in the text.
       pastedimage1607922670863v1.png
    2. Hide the field label on the form level in CRM itself (the hidden class is only applied to the field control so the label must be hidden at the form level). This will remove the label from the DOM 
    • Power Apps (checked)
      pastedimage1607922782734v3.png
    • Classic (unchecked)
      pastedimage1607922820491v4.png

    I hope this helps someone as this post is a bit late to the game.

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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard > Customer Service

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans