Community
Showing results for 
Search instead for 
Do you mean 
Reply

Trap history created in the web client

Nickel Super Contributor
Posts: 441
Country: UK

Trap history created in the web client

Is there a way to cacth histories being created in the web client?

 

TIA

 

Tom

Nickel Super Contributor
Posts: 441
Country: UK

Re: Trap history created in the web client

OK I think I've got it (see below) but when I debug mu plugin it never seems to run, am I missing something?...

 

TIA

 

Tom

Public Class Class1 'implement this to become a web plugin Implements Act.Web.Framework.IWebPlugin 'ref to the act for web session Private APFW_Session As Act.Web.Framework.ACTSessionManager Public Sub Init(ByVal session As Act.Web.Framework.ACTSessionManager) Implements Act.Web.Framework.IWebPlugin.Init 'run after login, collect the act web session APFW_Session = session 'add a handler to the history created event AddHandler session.Framework.Histories.CreateHistoryComplete, AddressOf HistoryCreated End Sub Private Sub HistoryCreated(ByVal history As Act.Framework.Histories.History) 'create history complete Dim contacts As Act.Framework.Contacts.ContactList = _ APFW_Session.Framework.Contacts.GetContactsByID(Nothing, New Guid() {New Guid(APFW_Session.CurrentContactID)}) contacts(0).Fields("Contact.Address 1", False) = "some test data" contacts(0).Update() APFW_Session.Contacts.IsRefreshPending = True End Sub

 

Nickel Super Contributor
Posts: 441
Country: UK

Re: Trap history created in the web client

Right, I have the plugin loading now, you need to put it in C:\Program Files\Act\Act For Web\APFW\Plugins..... next thing is to get the page to refresh, the data is saved and if you log out and in again you can see it but I want to refresh the page when the field is updated on the contact screen, somthing like ActApp.RefreshLoadedViews() in the Windows client.

 

TIA

 

Tin