You need to sign in to do that
Don't have an account?
Rahul 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
<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
http://www.salesforce.com/us/developer/docs/api_console/Content/sforce_api_console_addpushnotificationlistener.htm