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,
I have the same question (0)
  • 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

    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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

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

#1
Pallavi Phade Profile Picture

Pallavi Phade 102 Super User 2026 Season 1

#2
Abhilash Warrier Profile Picture

Abhilash Warrier 55 Super User 2026 Season 1

#3
ManoVerse Profile Picture

ManoVerse 53 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans