• Rahul Chowdary
  • NEWBIE
  • 0 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 2
    Replies
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
i have scenario that i need to call a javascript function after the action method execution complets . i have used oncomplete() also but the problem is my page is navigating to next page so the oncomplete() is not working.
i have scenario that i need to call a javascript function after the action method execution complets . i have used oncomplete() also but the problem is my page is navigating to next page so the oncomplete() is not working.

Hi

 

To invoke action method we generally use Action Poller. 

 

Is there any alternative for this. Thank you