Community
Showing results for 
Search instead for 
Do you mean 
Reply

How to programmatically change a view?

New Member
Posts: 6
Country: United Kingdom

How to programmatically change a view?

I have written a plugin that takes an incoming telephone call and locates the desired contact.

When ACT is currently in Contacts view it correctly locates and moves to the matched contact (see code fragment below).

But, when ACT is in another View, eg: Tasks, it does not change to the Contact view.

 

_objActApplication.UIContactManager.ShowContact(objSearchResults[0]);
_objActApplication.UIContactManager.ShowDetailView();
_objActApplication.UIContactManager.SetFocus();
_objActApplication.WindowState = FormWindowState.Normal;
 

My question, is how can I change the current View in code?

The CurrentView property is read-only (even though the SDK has it as read/write).

Many thanks.

 

Steve

New Member
Posts: 6
Country: United Kingdom

Re: How to programmatically change a view?

Found the answer!

To help anyone else, the solution is:

 

_objActApplication.RefreshView("Act.UI.IContactDetailView");

 

Cheers!

Tuned Listener
Posts: 18
Country: United States

Re: How to programmatically change a view?

THANK YOU for posting the answer. It made the difference in my morning.
Copper Contributor
Posts: 42
Country: United States

Re: How to programmatically change a view?

Thank you for the help, OakAdmin.

 

As a follow-up, I also want to use UIContactManager.SetTabPageActive, but it takes an entityString as its parameter.  Does anyone have a working example of this?  Specifically, if possible, I am looking to open the Activities tab.  I've tried searching the SDK and these forums, but to no avail.