Skip to main content

Freshsales: app.activated not firing

  • January 11, 2019
  • 1 reply
  • 44 views

Having trouble to get my app to load.


Given the following code snippit. When a user browses to the "lead" or "contact" details screen the application does not fire the event onAppActivated(). The only way i can get it to work is to click on the "more integrations" tab, and then click back on my application tab and then it will fire. It will not fire when the lead is initially loaded. Can anyone offer some advice? 


 

var client;
$(document).ready( function() {
	app.initialized().then(
    function(_client)
    {
      client = _client;
	  _client.events.on("app.activated", onAppActivated);
      _client.events.on("app.deactivated", onAppDeactivated);
    },
    function(error){});
	});
	
	function onAppActivated() {
// Do something
}

 

This topic has been closed for replies.

1 reply

Could you give a little more info on where you have positioned the app?