Tip #134: How to block click-to-call in CRM

People would like to have an option to switch click-to-call functionality off.

Unfortunately, none of the suggestions is going to work. Why? Because this functionality relies on URL protocols skype: (for Skype) and tel: (for Lync). You can try fooling the system by deregistering protocols, fiddling with the registry, disabling addins, blocking addins, directing to one instead of another but the truth remains that CRM, while not being able to invoke Skype/Lync will duly create a blank phone activity record you’d have to cancel.

Hear you.

Step 1. If you strong opponent of unsupported customization, close your browser window now.

Step 2. I’m glad you stayed. Create and publish javascript resource with the following code:

function BlockCalls() {
   Mscrm.ReadFormUtilities.handlePhoneNumberClick 
      = function(a) {};
}

Step 3. Add this resource to the form where you’d like to disable the functionality, e.g. contact form

Step 4. Add BlockCalls to Form’s OnLoad event, save and publish.

You are welcome.

The usual disclaimer: use at your own risk, contains small parts, choking hazard, swim between the flags. Not tested on animals, children or CRM 2011.

10 thoughts on “Tip #134: How to block click-to-call in CRM

  1. mayela says:

    How to update this script for CRM2015?

  2. Ali says:

    In Dynamics CRM 2015 Online (new form rendering) the above script was not doing the trick. After debuggin CRM scripts and try hitting several time I caught the point in Mscrm API that was handling the Skype/Lync window on phone number click.

    This script change

    Mscrm.ReadFormUtilities.openPhoneClient = function () { return; }

    will disable the default telephony providers (Skype/Lync) completely.

  3. Mark says:

    It seems that Mscrm.ReadFormUtilities is undefined during the OnLoad event (CRM 2016). Any idea on how to resolve this?

  4. For CRM 2016:
    When you disable “Legacy form rendering” in system settings, you will need to use this form:

    parent.Mscrm.ReadFormUtilities.handlePhoneNumberClick

    or maybe more suitable some times:
    parent.Mscrm.ReadFormUtilities.openPhoneClient = function(phoneNumber) {
    // Do something with phoneNumber
    return false;
    };

  5. Mike says:

    This one works on 2015 and 365. A sligh variation where it disables the popout but still does the click to dial…http://dynamicstelephony.com/res/index.php/how-to-disable-click-to-dial-phonecall-popout

  6. SJB says:

    Any idea how we can add click to call features on view? because in form whether phone number files is there click to call button will show automatic but not in view why?

Leave a Reply

Your email address will not be published. Required fields are marked *