---
schema_version: "1"
id: a714f658ec63ae4ac5a3a2616d2af2851e400b7be4f43ac6ff18f3217f40bb5f
title: screenPop() 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-screenpop.md
canonical_url: https://developer.salesforce.com/docs/service/api-cti/guide/sforce-api-cti-screenpop.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: f73106d193f1ec11ef10bb3a0c9e37aba31f0496e9224542d87e1fc36719328e
products:
  - Open CTI Developer Guide
  - Service Cloud Developer Content
---

# screenPop() for Salesforce Classic

## Usage

Pops to a target URL, which must be relative.

## Syntax

```javascript
sforce.interaction.screenPop(url:string, force:boolean, (optional) callback:function)
```

## Arguments

|Name|Type|Description|
|------|------|-------------|
|`url`|string|A relative URL, which specifies the location of the screen pop.|
|`force`|boolean|Set value to `true` to force a screen pop, `false` otherwise. This argument is only available in API version 28.0 and later.|
|`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/28.0/interaction.js"></script>
   <script type="text/javascript">
       var callback = function (response) {
           if (response.result) {
              alert('Screen pop was set successfully.');
           }
           else {
              alert('Screen pop failed.' + result.error);
           }
        };
       function screenPop() {
                //Invokes API method
                sforce.interaction.screenPop('/001x0000003DGQR', true, callback);
        }
</script>
</head>
<body>
       <!-- Note that '001x0000003DGQR' is an example of an object Id to screen pop. -->
       <button onclick="screenPop();">screen pop to entity Id</button>
</body>
</html>
```

## Response

|Name|Type|Description|
|------|------|-------------|
|`result`|boolean|`true` if the screen pop was successful, `false` if the screen pop wasn’t successful.|
|`error`|string|If the API call was successful, this variable is undefined. If the API call failed, this variable returns an error message.|


