jump to navigation

Microsoft Dynamics CRM 4.0 Hiding taskbar buttons July 22, 2010

Posted by jarrettexpertcrm in Microsoft CRM General.
Tags: , , , , , , , , , , , ,
5 comments

In many occasions you may need to hide a task bar button on a form, lucky for you i’m going to show you how. Im also going to show those of you that do not know how to use the developer tool bar to grab the name of the button you are wanting to hide. In this example i am going to hide the “Create Invoice” button on the Order.  First open an exsisting order and press ctrl N. You now have the option to go to your developer tool bar. Upper right hand corner click tools, then developer tool bar.

 Once the dev toolbar has finished loading go to find, select element by click. Put your mouse over the button you want to hide, you will notice a blue outline over the button. Click that button and the properties of that button come up on your dev toolbar. Look for you button and you will see the ID for it.  You can hide the button in many different scenarios but for a simple example i am just going to hide it when the form loads. Place the following code onload.

var CreateInvBtn=document.getElementById(‘_MBprocessOrder’);
if(CreateInvBtn!=null)
            CreateInvBtn.style.display=’none’;

_MBprocessOrder is the ID of the button i am hiding in this example, for those that are hiding a different button replace that with your button ID. When you want to have the button show again use the following code:

var CreateInvBtn=document.getElementById(‘_MBprocessOrder’);
if(CreateInvBtn!=null)
            CreateInvBtn.style.display=’inline’;

Enjoy!

For more information about Dynamics Four or to contact us please visit http://www.dynamics4.com