When to Use the Salesforce Console Integration Toolkit
Change a Visualforce Page by Using the Salesforce Console Integration Toolkit
addPushNotificationListener()
removePushNotificationListener()
Previous Versions
Removes a listener that gets added for a push notification. This method is only available in API version 26.0 or later.
For more information on push notifications, see Methods for Push Notifications.
1sforce.console.removePushNotificationListener((optional) callback:Function )| Name | Type | Description |
|---|---|---|
callback | function | A function called when the removal of the push notification listener completes. |
1<apex:page standardController="Case">
2
3 <A HREF="#" onClick="testRemovePushNotification();return false">
4 Click here to remove push notification</A>
5
6<apex:includeScript value="/support/console/68.0/integration.js"/>
7 <script type="text/javascript">
8
9 function testRemovePushNotification() {
10 sforce.console.removePushNotificationListener(removeSuccess);
11 }
12 var removeSuccess = function removeSuccess(result) {
13 //Report whether removing the push notification listener is successful
14 if (result.success == true) {
15 alert('Removing push notification was successful');
16 } else {
17 alert('Removing push notification wasn't successful');
18 }
19 };
20 </script>
21</apex:page>This method is asynchronous so it returns its response in an object in a callback method.
| Name | Type | Description |
|---|---|---|
success | boolean | true if removing the push notification listener was successful; false if removing the push notification listener wasn’t successful. |