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 :
Customer experience | Sales, Customer Insights,...
Suggested Answer

Unable to hide fields of Quick View form on Unified interface 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
    arif imteyaz Profile Picture
    375 on at

    try to use below codes

    var personalClient = Xrm.Page.getControl("new_personalpolicyholderid");

    var commercialClient = Xrm.Page.getControl("new_commercialpolicyholderid");

    if(personalClient.getAttribute().getValue() == null)

    {

     personalClient.setVisible(true/false);

    }

    else if(commercialClient.getAttribute().getValue == null)

    {

     commercialClient.setVisisble(true/false);

    }

  • Sanket1751991 Profile Picture
    10 on at

    I am facing this issue for fields of Quick view form on UCI.

  • Suggested answer
    ajyendra Profile Picture
    1,738 on at

    Try this

    //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 (formContext.ui.getFormType()==1) {

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

                   }

               }

           }

       }

       catch (ex) {

       }

    }

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!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
ManoVerse Profile Picture

ManoVerse 128 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 119

#3
Muhammad Shahzad Shafique Profile Picture

Muhammad Shahzad Sh... 69 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans