Community
Showing results for 
Search instead for 
Do you mean 
Reply

API access for synchronizing

Highlighted
Tuned Listener
Posts: 30
Country: USA

API access for synchronizing

Is it possible to access the synchronization API (Start, Sync progress, end of sync) to include these in an addon??

 

Highlighted
Employee
Posts: 1,163
Country: USA

Re: API access for synchronizing

Check out the SynchronizationManager class, it contains a SyncNow method.

Matthew Wood
Act! SDK Support
Community Moderator
Highlighted
Bronze Elite Contributor
Posts: 2,119
Country: United_Kingdom

Re: API access for synchronizing

Hi,

 

I'm feel a bit ignorant asking this question but for the life of me I can't seem to work it out! The SyncNow() takes a ISycTask by ref but I have absolutely no idea where to get this Object and what implements this interface?? Could someone point me in the right direction?

Vivek Gargav
Caldere Associates Ltd.
www.caldere.com
vgargav@caldere.com
My Blog
Highlighted
Astute Commentator
Posts: 197
Country: United States

Re: API access for synchronizing

SynchronizationManager.SyncNow

 

Mathew,

 

Thank you for your input on the SynchronizationManager. However, the SyncNow expects a value passed to it of type Utils.iSYncTask. What is this? If the SyncNow is called with the iSYncTask not set to anything, nothing happens. So what parameters does one need to set on the iSyncTask to make the SyncNow execute?

 

I am looking to sync everything on the database.

 


                Dim iSyncTaskWhatnot As Act.Framework.Synchronization.Utils.ISyncTask
                

                ACTFM.SynchronizationManager.SyncNow(iSyncTaskWhatnot)

 

Thank you.

 

T

Highlighted
Bronze Super Contributor
Posts: 1,284
Country: USA

Re: API access for synchronizing

If this code is in a plugin, why not call ExecuteCommand with the menu command string for syncing?


ACTApplication.ExecuteCommand("act-ui://com.act/application/menu/file/synchronizenow")

 

-- Jim Durkin

Highlighted
Astute Commentator
Posts: 197
Country: United States

Re: API access for synchronizing

Thanx. However, the code is not a plugin. It access the ACT! Framework and the framework is fully available.

 

I'd like to know what .... parameter to pass to the SyncNow. Is there any docs on this?

 

T

Highlighted
Astute Commentator
Posts: 197
Country: United States

Re: API access for synchronizing

Again,

 

Does anyone have any code that makes the SyncNow work using the ACT! Framework?

 

I know, this should be easy but at the moment it does not work.

 

T

Highlighted
Employee
Posts: 34
Country: USA

Re: API access for synchronizing

I don't know if what you want to do is possible, however Scheduler calls SyncNow without an Application reference.  

 

So maybe this example code from Scheduler will be helpful.   These are the relevant bits.  

 

ActFramework f = new ActFramework();
ConnectionType connectionType = (ConnectionType)f.SynchronizationManager.ConnectionTypePref; 
ISyncTask syncTask = new SyncStartUp(SyncType.Remoting, connectionType);
f.SynchronizationManager.SyncNow(ref syncTask);

 

Connection type is an enum in Act.Framework.Synchronization.Utils and resolves to Network or Web (or None)

 

Highlighted
Astute Commentator
Posts: 197
Country: United States

Re: API access for synchronizing

Thank you. that is a step beyond where I was. However, the sync still does not fire up and do the job. It takes a little bit longer and then just return nothing.

 

T

Highlighted
Silver Super Contributor
Posts: 2,342
Country: USA

Re: API access for synchronizing

Thatch,

 

I just tried it for fun and it is synching.  That's why it's pausing for so long :-).

 

Stan


If you would like to get more out of ACT! you can find an ACT! Certified Consultant near you by going to:www.act.com/acc.
-------------------------------------------------------------------------------------
Stan Smith
ACT! Certified Consultant
ADS Programming Services, Inc.
(205) 222-1661
www.adsprogramming.com
www.actwebhosting.com
Click Here to Purchase Act!