Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

In CRM 2011 I've a tab (drop-down), which has an Iframe or whatever.

Could i make it open by default if there is something inside and close by default if there isn't any data inside of this tab?.

Or, what if it's not an IFrame inside of tab, may be a web- resource

So, is there any way to do it?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

You want expand or collapse a tab in Onload of form, right?

So you have to use this function:

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

The state of the tab is independently of the content.

share|improve this answer
    
however, is it possible to do that the tab will be dependent of the content!? I mean, it the content is in a tab then the tab'll be "expanded" and if it isn't the the tab will be "collapsed" –  Leo Mar 21 '13 at 9:32
    
Which content are you talking about? It's different accessing inside an Iframe or a control of crm form. But it's possible. –  Pedro Azevedo Mar 21 '13 at 10:46
    
by content I mean, attached files for example –  Leo Mar 21 '13 at 11:14
    
You want see the content of a attached file? This i think you can't. You can depend of a field in CRM Form or a field in a IFrame –  Pedro Azevedo Mar 21 '13 at 11:18
    
okay, I'll check. thanks –  Leo Mar 21 '13 at 11:22

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.