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 :
Microsoft Dynamics 365 | Integration, Dataverse...
Suggested Answer

Unable to hide fields of Quick View form using javascript

(0) ShareShare
ReportReport
Posted on by 10

I am unable to hide fields of Quick View form on unified interface using javascript. I am using below code for hiding fields inside quick view form. This code works on Classic UI of CRM but doent work on Unified interface.

//function to show or hide fields of Quick View Form
function hideQuickViewFormFields(executionContext) {
    var functionName = "hideQuickViewFormFields";
    try {
        //check executionContect is Valid or not
        if (executionContext != null && executionContext != undefined) {
            //get formContext
            var formContext = executionContext.getFormContext();
            //check formcontext is Valid or not
            if (formContext != null && formContext != undefined) {
                var quickViewControl = formContext.ui.quickForms.get("contactquickviewform");
                if (quickViewControl != null && quickViewControl != undefined) {
                    quickViewControl.getControl("firstname").setVisible(false);
                }
            }
        }
    }
    catch (ex) {
    }
}
I am not able to hide the fields of Quick view form on UCI and also not getting any errors.
Please let me know if any one able to hide the fields of Quick view form on UCI.
Thanks,
  • Suggested answer
    Henry J. Profile Picture
    5,237 on at

    Hi,

    This should be working and is supported (docs.microsoft.com/.../formcontext-ui-quickforms)

    I did a quick test in the browser console (so that's why I use Xrm.Page in the code below and not executionContext.getFormContext()) on the default account form of a vanilla environment, and the field gets hidden:

    var quickViewControl = Xrm.Page.ui.quickForms.get("contactquickform");

    quickViewControl.getControl("emailaddress1").setVisible(false);

    With your Quick View Form and Field, this should be:

    var quickViewControl = Xrm.Page.ui.quickForms.get("contactquickviewform");

    quickViewControl.getControl("firstname").setVisible(false);

    This might help you get to the bottom of it.

    If you can't troubleshoot it, consider opening a support request: admin.powerplatform.microsoft.com/support

    Henry

  • Suggested answer
    Abdul Wahab Profile Picture
    12,119 Moderator on at

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the August Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Microsoft Dynamics 365 | Integration, Dataverse, and general topics

#1
11manish Profile Picture

11manish 59 Super User 2026 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 38 Most Valuable Professional

#3
Travis South Profile Picture

Travis South 28

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans