Tuesday, September 23, 2008

Hiding the Save/Close button in Microsoft CRM 4.0

UPDATE: Check if the button is on the form.

I've been doing a lot of work with Microsoft CRM 4.0 recently. One simple thing I wanted to do was to remove the "Save Close" button from a CRM window.

You can achieve this via Customizations in CRM (under Settings) and override the OnLoad JavaScript event for the form and use the following JavaScript:
if (document.all._MBcrmFormSaveAndClose != undefined)  
{
document.all._MBcrmFormSaveAndClose.style.display='none';
}
That’s it, job done.

Note you need to check if the button is on the form as users without Write permission will not have a button hence without the check, the javascript will fail.

I'll be posting more complex stuff on Microsoft CRM in the future...

1 comment:

Anonymous said...

Great.. short and simple explanation :-)