Archive for September 2011
I am currently developing a CRM system in 2011 for one of our biggest clients. One of the requirements is to create editable lists which i have decided is best handled by creating holding entities for this information. For example, creating an entity to hold marketing sources allows easier reporting across selected sources and allows the marketing team to manage the list (adding new ones and deactivating unused ones). The problem with this is that to add a value to this it involves opening a whole CRM form which isn't the best. So, for these entities I don't display the left-navigation options and i wanted to minimize the Ribbon.
However, this wasn't as easy as it sounds…
First of all, having scoured the SDK i could see plenty of examples of how to add or hide BUTTONS on the ribbon and even (via other blogs) remove the ribbon itself, but nothing that would minimize the ribbon allowing it to be expanded if needed.
However, still didn't work…..
Reason being, that the Ribbon seems to be one of the last things to Load in the form, loading after the OnLoad events have fired. So, i needed to add a timeout to wait before firing the script and it worked a treat! Final code ended up as:
Which gave the following results:
No matter how i tried i could not get this to work. However, after some detective work……and reading this blog post (cheers) i realised that the bit i was missing was that in the script, the brackets need to contain the name of the tab (name, not the Label). However, it has to be contained in “”. So my code was…
Sorted! Hope that helps