Community
Showing results for 
Search instead for 
Do you mean 
Reply

Web Plugin custom tab - refresh date when contact is selected

Champion Listener
Posts: 7
Country: Poland

Web Plugin custom tab - refresh date when contact is selected

Hello,

 

I am working on creating a custom tab in the ACT for WEB 2010 interface.

 

I have the web plugin working that adds the tab to the ACT and it shows some date for the contact.

 

I need to know how to refresh the information in the tab when another contact is selected.

 

Can anyone tell me how to do this?

 

Thanks,

Cinu

Copper Super Contributor
Posts: 59
Country: USA

Re: Web Plugin custom tab - refresh date when contact is selected

Hi Cinu,

 

I'm not sure if it works the same way in ACT for web, but in ACT for windows, you can hook to the applicationstate.currentcontactchanged event which will get fired every time you navigate contacts.  

Hugo Vale
Datastream Custom Solutions
http://www.datastreamcs.com
Copper Contributor
Posts: 10
Country: United Kingdom

Re: Web Plugin custom tab - refresh date when contact is selected

I face the same issue,

 

Has anyone found a way to trigger the refresh of a custom web tab when changing from one opportunity to another in detail view?

 

Thanks,

 

Rob.

Employee
Posts: 1,163
Country: USA

Re: Web Plugin custom tab - refresh date when contact is selected

These two handlers should allow you to keep track of when a contact is about to change and when they have changed 

 

ActApp.CurrentContactChanging += new EvenHandler(ActApp_CurrentContactChanging); 

ActApp.CurrentContactChanged +=new EventHandler(ActApp_CurrentContactChanged);

 

Opportunities have similar event handlers. 

 

Matthew Wood
Act! SDK Support
Community Moderator
Copper Super Contributor
Posts: 59
Country: USA

Re: Web Plugin custom tab - refresh date when contact is selected

And if I'm not mistaken there's also the same handlers but for Opportunities:

 

ActApp.CurrentOpportunityChanging += new EvenHandler(ActApp_CurrentOpportunityChanging); 

ActApp.CurrentOpportunityChanged +=new EventHandler(ActApp_CurrentOpportunityChanged); 

Hugo Vale
Datastream Custom Solutions
http://www.datastreamcs.com
Copper Contributor
Posts: 10
Country: United Kingdom

Re: Web Plugin custom tab - refresh date when contact is selected

Hi Guys,

 

Thanks for the replies, they look very promising but I am not sure if I can use these in web.

I do not get passed an ACTApplicationManager instance when creating a web plugin. I get an ACTSessionManager instance.

 

Is there any way I can access the ACTApplication from the this ACTSessionManager?

 

Also, if i do manage to access the ACTApplication, should I trigger the refresh from the tab itself or from the plugin that instanciated the custom tab.

 

 

Thanks,

 

Rob.

Copper Contributor
Posts: 10
Country: United Kingdom

Re: Web Plugin custom tab - refresh date when contact is selected

Hi All,

 

The lovely people at Sage have helped me to find a solution to this problem.

 

On the tab page, you need to override the javascript function RefreshTabList().

This method is called on the active tab when moving to the first/previous/next/last company, contact or opportunity in detail view.

 

I solved my problem by placing the following code on my tab page.

 

<script language="javascript" type="text/javascript" >

function RefreshTabList()
{
location.reload(true);
}

</script>

 

 

I hope this proves useful to others,

 

Rob.

Highlighted
New Member
Posts: 4
Country: Philippines

Re: Web Plugin custom tab - refresh date when contact is selected

Hi Cin,

Can you please help me how to create a custom tab in contact detailview in act! premium web. I'm using Act! Premium v18 Web.
do you have any sample code?

Thankyou.