Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics 365 | Integration, Dataverse...
Suggested answer

Hide or Show QuickView on form using JavaScript

(0) ShareShare
ReportReport
Posted on by 60

Good Day and thank you for your interest. 

We have a business requirement to show or hide a quickview form control on the Opportunity form in CRM. I am aware of the hiding section method where the quickview is on the section and we can utilize the JS to hide the entire section. However, that method does not apply to our business use because the quickview is located in conjunction with other fields. Attached are images to reflect the descriptions. Kindly advise and share sample code if possible.

Thank you and Best Regards,

Arslan

QuickviewJS.PNG

QuickViewJSproperties.PNG

  • Suggested answer
    Steve Zhao2 Profile Picture
    Steve Zhao2 on at
    RE: Hide or Show QuickView on form using JavaScript

    Hi Arslan001,

    You could use formContext.ui.quickForms.get(arg) to get your quick view form control. The parameter arg should be the quick view index or quick view name. Then use setVisible(bool) to show or hide it.

    You can get quick view name from here:

    pastedimage1668563934902v1.png

     

    The sample code is like this:

    function hideQuickForm(execuationContext){
    	var formContext = execuationContext.getFormContext();
    	
    	//get the quick view control
    	var quickViewControl = formContext.ui.quickForms.get("contactquickform");
    	
    	//hide the quick view
    	quickViewControl.setVisible(false);
    }

     

    Reference:

    formContext.ui.quickForms (Client API reference) in model-driven apps - Power Apps | Microsoft Learn

    quickViewControl.setVisible (Client API reference) in model-driven apps - Power Apps | Microsoft Learn

  • Suggested answer
    Bipin D365 Profile Picture
    Bipin D365 28,961 Moderator on at
    RE: Hide or Show QuickView on form using JavaScript

    Hi,

    Try below code

    formContext.getControl(arg).setVisible(false);

    Replace are with "yourquickviewname"

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,409 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans