Posted by : XRM Consultant Wednesday, 14 October 2009


I was having a problem with some JavaScript in MS Dynamics CRM 4.0. I had added the function to a form to hide or show a tab that contained a number of options to hide and show navigation options on the left-hand menu. The problem was that when I loaded the form with the tab hidden, any JavaScript on the hidden tab would not work as it had not been loaded with the rest of the form. 


To get around this, I needed to save the form, after I had shown it. I found a very very simple piece of JavaScript to automate this and inserted it at the end of my function as shown:



//Hide Or Show Display Options Tab
if (crmForm.all.cit_showhidenavoptions.DataValue == false) 
{
    //hide the second tab
    crmForm.all.tab6Tab.style.display = "none";
    crmForm.Save();
}


else {
    //show the second tab
    crmForm.all.tab6Tab.style.display = ""; 
    crmForm.Save();
}


Simplest ones are definately the best


Hope this helps


xRM Consultant

{ 1 comments... read them below or add one }

  1. Gone through this wonderful coures called Salesforce Certification Training in Dallas who are offering fully practical course, who parent is Salesforce Training in USA and they have students at Salesforce Training classes in Canada institutes.

    ReplyDelete

Search This Blog

Popular Post

About xRM Consultant.com

Having worked with Microsoft Dynamics CRM 4.0 in a sales & development environment, my focus now is on customising this awesome solution and showing its true potential.
Powered by Blogger.

- Copyright © xRM Consultant -Metrominimalist- Powered by Blogger - Designed by Johanes Djogan -