web
You’re offline. This is a read only version of the page.
close
Skip to main content
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,
I have the same question (0)
  • Suggested answer
    Henry J. Profile Picture
    5,237 on at
    RE: Unable to hide fields of Quick View form using javascript

    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
    RE: Unable to hide fields of Quick View form using javascript

    Hi Sanket1751991,

    Article might help you https://www.magnetismsolutions.com/blog/jordanhohepa/2018/08/23/using-javascript-to-set-quick-view-form-visibility-in-dynamics-365

    Let me know if You need anything else.

    Thanks

    Regards,

    AW

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

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

#1
#ManoVerse Profile Picture

#ManoVerse 105

#2
Siv Sagar Profile Picture

Siv Sagar 93 Super User 2025 Season 2

#3
Martin Dráb Profile Picture

Martin Dráb 74 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans