web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Expand Tabs

(0) ShareShare
ReportReport
Posted on by

Hi, 

i have 5 tabs in my CRM form, and i need them all to be collapsed when the form is loaded, so i set the Expand by default property to be false. 

but when i load the form, the first 2 tabs are Collapsed..after seconds without doing any action, they get non-collapsed  

what shall i do to solve this? 

thanks 

your help is appreciated 

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Nizar JLASSI Profile Picture
    2 on at

    Hi,

    You can do it by javascript using :

    Xrm.Page.ui.tabs.get("tabname").setDisplayState('collapsed');

    see this link : www.mscrmconsultant.com/.../expand-collapse-tab-using-javascript-in.html

  • Verified answer
    Hosk Profile Picture
    on at

    When you save the form in design mode, if you set the tabs to be collapsed, then they should load in this state.

    how are the tabs displayed on the design form?

    You could then expand them them in the onload using Javascript if you wanted

  • Verified answer
    Bruno Lucas Profile Picture
    5,421 on at

    if the form property is set to collapse, but it still expand, would you have anything like this  on a JavaScript?

    Xrm.Page.ui.tabs.get("<tabName>").setDisplayState("expanded");

    this is a client side action, the only 2 reasons it would expand on its own is a JavaScript forcing it or a browser incompatibility.

  • Community Member Profile Picture
    on at

    Thanks All

  • Community Member Profile Picture
    on at

    Just an update to this post trail.

    I found another scenario in which the behaviour occurs.

    If you have an invisible/hidden field that is in a collapsed tab that you then set to visible (via Business Rules or presumably jscript) during the load event, the tab will auto expand.

  • Alexandros Miaris Profile Picture
    2 on at

    Hello,

    I also have the same issue.

    I have all my tabs collapsed, but when I activate a business rule which hides/shows fields the tab with those values is auto expanded.

    Is there a way to resolve this? Also note that I have two identical instances (Production & Sandbox) and i do not get the same issue in the Sandbox.

    Thanks'

    Alex

  • Community Member Profile Picture
    on at

    I'm also experiencing an issue like this.

    Earlier today, while customizing our sandbox-instance, I experienced a bug which I have experienced a couple of times before - where a couple of business rules that manage displaying or hiding a few fields suddenly stop working all together. This leads to me having to completely delete the rule, and rebuild it. But this time this whole tab-expand/collapse thing also happened. 3 tabs in 2 entities now absolutely refuse to collapse by default, no matter what I try. The properties of the tabs/forms clearly indicate that they are set to collapse by default.

    I see, based on other posts on the matter, that this has to do with business rules such as the ones I use (show/hide fields), but this is not an issue in the dozens of other show/hide rules I use. Only these tabs.

    Is there a straight forward solution to this? Do I have to rebuild my tabs in these entities aswell? Does that even work?

    I appreciate any and all answers that can help me with this.

  • Community Member Profile Picture
    on at

    Hi Ariel

    i have fixed this by using Javascript to collapse all tabs on load

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 CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans