You need to sign in to do that
Don't have an account?
Fahad-Akhtar
addPushNotificationListener() Method on console
I am using "addPushNotificationListener()" method in my VF page and below is my code
I have also enabled case object and case fields for push notificaiton in service cloud console app.
Thanks for your help in advance!
<apex:page standardController="Case"> <apex:includeScript value="/support/console/26.0/integration.js"/> <script type="text/javascript"> var eventHandler = function (result) { alert('There is a push notification of object: ' + result.Id); }; alert('I am called'); //Add a push notification listener for Case and Account sforce.console.addPushNotificationListener(['Case'], eventHandler); </script> </apex:page>
I have also enabled case object and case fields for push notificaiton in service cloud console app.
Thanks for your help in advance!
Best Answer chosen by Fahad-Akhtar
Fahad-Akhtar
Solution: we did a couple of things and it worked for us, I am not sure How reliable "addPushNotificationListener()" is, Salesforce recommended that if we can’t make it work switch to Streaming API, We added "push Topic" object permissions to all profiles and just added and removed fields from console push notification settings and it worked, We do need console push notification settings to make "addPushNotificationListener()" work, though some documentation says we don’t.