Community
Showing results for 
Search instead for 
Do you mean 
Reply

Refreshing user view of database after an external update

Accepted Solution Solved
Copper Contributor
Posts: 13
Country: USA
Accepted Solution

Refreshing user view of database after an external update

I'm building a application which interfaces with an ACT database file via ActFramework.

 

When I do a Contact.Update() from the application (with ACT Premium running), it seems that I need to reopen the database from Act Premium to view the changes.

 

  1. Is my approach wrong? If not,
  2. Is there any way to have the UI update?

Accepted Solutions
Solution
Accepted by topic author apemberton
‎09-25-2015 03:20 AM
Employee
Posts: 1,163
Country: USA

Re: Refreshing user view of database after an external update

Sure does, if you take a look at the Code Reference chm and search in the index for refresh, you'll see there are various refresh methods for refreshing different views or you can simply refresh all the currently loaded views:

 

Snippet

ActApp.RefreshLoadedViews();
Matthew Wood
Act! SDK Support
Community Moderator

View solution in original post


All Replies
Employee
Posts: 1,163
Country: USA

Re: Refreshing user view of database after an external update

With just Framework level access there is going to be anyway to do UI operations such as refreshing the view.

 

You shouldn't have to restart act however, refreshing (F5) should update the information.

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

Re: Refreshing user view of database after an external update

I'm also building a plugin. So I can possible do a refresh on an appopriate UI event. Does the API allow refreshing by a plugin?

Solution
Accepted by topic author apemberton
‎09-25-2015 03:20 AM
Employee
Posts: 1,163
Country: USA

Re: Refreshing user view of database after an external update

Sure does, if you take a look at the Code Reference chm and search in the index for refresh, you'll see there are various refresh methods for refreshing different views or you can simply refresh all the currently loaded views:

 

Snippet

ActApp.RefreshLoadedViews();
Matthew Wood
Act! SDK Support
Community Moderator
Copper Contributor
Posts: 13
Country: USA

Re: Refreshing user view of database after an external update

Thank you. I'll have to look at all the available events to determine which is the best to use. I don't want to be refreshing too often either.

 

This might be documented, in which case I'll come across it soon, but does refreshing lose unsaved user changes?

Employee
Posts: 1,163
Country: USA

Re: Refreshing user view of database after an external update

A refresh will save any data that isn't already.

Matthew Wood
Act! SDK Support
Community Moderator