function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Rahul ChowdaryRahul Chowdary 

Add Push notification listener is not working in visualforce

i am trying to use sforce.console.addPushNotificationListener() in my console app but i am bale to call the method but the call back method :event handler is not calling .i am working on opportunity and i have added opportunity to console app and i have added all the fields of opportunity to console app .after placed the code i have updated my opportunity but the EVENT HANDLER method is not calling

<script type="text/javascript">
var eventHandler = function (result) {
alert('There is a push notification of object: ' + result.Id);
};
//Add a push notification listener for opportunity and Account
    if (sforce.console.isInConsole()) {
alert('in console');
sforce.console.addPushNotificationListener(['opportunity', 'Account'], eventHandler);
        }
    else
        {alert('not in console');}
</script>

i have done some chnages in database and checked i didnt got any alert