Do not file a Communication from email screen and send only using outlook

By | November 30, 2012

Below shown is the Standard Email screen in SageCRM. As you can see there are two buttons Send Email and Send Using Outlook. Now the scenario is, I want to remove the Send Email button on the New Email screen and also stop filing email communications in CRM.

For the first part of the requirement to remove the Send Email button from the email screen you can refer our blog where we have explained how to remove the Send Email button from the email screen in detail. Please refer the below blog link for the same.
https://www.greytrix.com/blogs/sagecrm/2012/08/07/remove-send-e-mail-button-from-e-mail-screen-and-use-send-using-outlook-only/
Now what can be done on the second part of the requirement? In Sage CRM whenever we send an email, a communication is created. On the email screen there is Do not file this communication checkbox. This checkbox is responsible for filing or not filing the communication in CRM. If the checkbox is not checked, the email sent is saved into the CRM. If the checkbox is checked then that communication is not saved in CRM. By default this checkbox is unchecked. Now an idea to solve our problem is to uncheck this checkbox through script as soon as screen is loaded. Here is the script that can be added on the custom content of Communication Options screen to achieve the results.
<script for=window event=onload>
for(i=0;i<document.all.length;i++)
{
                if(document.all[i].tagName==’A’)
                {
                                if((document.all[i].outerHTML.search(“SendEmail.gif”)>-1) || (document.all[i].outerHTML.search(“Send E-mail”)>-1))
                                {
                                                document.all[i].style.visibility = hidden;
                                }
                }
                if(document.EntryForm.cbdonotfileComm)
                {
                                document.EntryForm.cbdonotfileComm.checked=true;
                }
}           
</script>
By the way I would prefer all my emails to be filed and I may not like to give users choice to uncheck this checkbox, but when it comes to business scenarios there might be many.