Skip to main content

Notifications

Announcements

No record found.

Customer experience | Sales, Customer Insights,...
Unanswered

Display or Hide a quick View Form

(1) ShareShare
ReportReport
Posted on by 72

To whom it may concern or can help me,

we are using Microsoft Dynamics 365 Version 1612(9.0.34.5) on premises. 

I am trying to display or hide a quick View Form based on a picklist. So I have a method that given the value will call JS method js_HidequickView or js_ShowquickView.

these method gather the object of the quickForm, and then try to setVisible to false or true respectively. The method setVisible is undefined?!?!?!?! 

As you can see below, I am able to retrieve the object, I am able to getVisible in the Console, but I cannot setVisible. The console recognize there is the set Visible method and suggest me to pass the visible value. 

What am I doing wrong?

Anyone who can help? 

   

in the above blog from 2018, it was already suggested that this method doesnt work and to set the quick form into a section and hide the section.

setvisibleErrorwithQuickForm.png

  • Hittori Profile Picture
    Hittori 72 on at
    RE: Display or Hide a quick View Form

    Amit, thanks for your answer.  if you can check on the code that I display in the images you can see that the code you provide me is exactly the same one I am using:

    function js_HidequickView(formContext, quickFormId) {

       var oquickForm = formContext.ui.quickForms.get(quickFormId);

       if (oquickForm != null) {

               oquickForm.setVisible(false);

       }

    }

    function js_ShowquickView(formContext, quickFormId) {

       var oquickForm = formContext.ui.quickForms.get(quickFormId);

       if (oquickForm != null) {

               oquickForm.setVisible(true);

       }

    }

    I can even do this:

    function js_ShowHidequickView(formContext, quickFormId, ShowHide) {

       var oquickForm = formContext.ui.quickForms.get(quickFormId);

       if (oquickForm != null) {

               oquickForm.setVisible(ShowHide);

       }

    }

    I used the documentation you mention, but it doesn't work.

  • Amit Katariya007 Profile Picture
    Amit Katariya007 9,125 Super User 2024 Season 1 on at
    RE: Display or Hide a quick View Form

    Hello Hittori,

    Please check below updated code.

    quickViewControl = formContext.ui.quickForms.get(arg); // arg = form name.

    quickViewControl.setVisible(bool);   //Specify true or false to display or hide the control.

    Also refer below article from MS.

    docs.microsoft.com/.../setvisible

    Another option is that you can add this quick view form in a Separate "Section". Then Perform Hide/Show Operation on the Section.

    vblogs.in/.../

    Thank you,

    Amit Katariya

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

Congratulations 2024 Spotlight Honorees!

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December!

Congratulations to our December super stars! 🥳

Get Started Blogging in the Community

Hosted or syndicated blogging is available! ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,684 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,414 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans