---
schema_version: "1"
id: 4c118dac720ff31fef57c00550b1157c37bbf325ad9114fa6ce9fad5c062f69a
title: disableClickToDial() for Salesforce Classic
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/service-cloud/api-cti/guides/sforce-api-cti-disableclicktodial.md
canonical_url: https://developer.salesforce.com/docs/service/api-cti/guide/sforce-api-cti-disableclicktodial.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: b06bd2b77e9e4c7d75efa87eaf9786cf8ada6f1b687fca286818bf47c93f06f2
products:
  - Open CTI Developer Guide
  - Service Cloud Developer Content
---

# disableClickToDial() for Salesforce Classic

## Usage

Disables click-to-dial.

## Syntax

```javascript
sforce.interaction.cti.disableClickToDial( (optional) callback:function )
```

## Arguments

|Name|Type|Description|
|------|------|-------------|
|`callback`|function|JavaScript method executed when the API method call is completed.|


## Sample Code–JavaScript

<!-- javascript set_clipboard -->
```javascript
<html>
<head>
   <script type="text/javascript" src="http://domain:port/support/api/25.0/interaction.js"></script>
   <script type="text/javascript">
       var callback = function (response) {
           if (response.result) {
              alert('Click to dial was disabled.');
           } else { 
              alert('Click to dial was not disabled.');
           } 
        };
        function disableClickToDial() {
   //Invokes API method
   sforce.interaction.cti.disableClickToDial(callback);
   }
</script>
</head>
<body>
   <button onclick="disableClickToDial();">disable click to dial</button>
</body>
</html>
```

## Response

This method is asynchronous. The response is returned in an object passed to a callback method. The response object contains the following fields.

|Name|Type|Description|
|------|------|-------------|
|`result`|boolean|`true` if click-to-dial was disabled, `false` if click-to-dial wasn’t disabled.|
|`error`|string|If the API call was successful, this variable is undefined. If the API call failed, this variable returns an error message.|


