Community
Showing results for 
Search instead for 
Do you mean 
Reply

Deleting and activity

Nickel Super Contributor
Posts: 441
Country: UK

Deleting and activity

Hi, this is probably a 2-fold question - I am trying to delete an activity using the framework but I cannot make it persist to the database - I have tried

ActFwk.Activities.DeleteActivity(activity, Nothing, False)

activity.Update()

But the activity remains in the database.  Do I need to put an accessor in instead of Nothing?  This leads me to the second part of my question - If I do need to put an accessor in how do I obtain one from the database, I can find nothing under the Activity Accessor Manager that appears to help.

TIA

Tom

Nickel Super Contributor
Posts: 441
Country: UK

Re: Deleting and activity

Strangely although the activity appears in the db still, if you try to open it it says - the activity has been deleted by the organiser, so I guess this means it has been deleted although it is still displayed in the ACT! UI.
 
Tom
Copper Contributor
Posts: 97
Country: USA

Re: Deleting and activity

Sounds like you need to somehow force a refresh of the UI... after deleting did you try: ActApp.UIActivityManager.RefreshActivityViews();
 
Would be nice if ActApp.UIContactManager.ShowContact() would do this by default, even if you're already on the contact (assuming you want Contact Detal view).  Haven't tested it though...
 
Something else to try... if you specifically change the Activity Type, or, the Activity Priority... the UI might react automatically... not necessarily helpful if you're deleting... Smiley Wink
 
Jason Sellers
ACT! Engineer 2000-2007
Nickel Super Contributor
Posts: 441
Country: UK

Re: Deleting and activity

Thanks Jason,
I was actualy running it from a stand alone application without ACT! open so it couldn't be a refersh issue - I have tried re-indexing the db to clear out the dleted items but they still display, having looked on the kb apperently act is 'working as designed' although I am dubious Smiley Happy
 
Tom
Bronze Elite Contributor
Posts: 2,115
Country: United_Kingdom

Re: Deleting and activity

Hi Tom,
 
This has had me stumped for a bit as well!
I'm not too hot on using delegates etc but do you reckon it might be possible to use the
 public delegate void ActivityManager.BatchActivityDeleteDelegate(Guid[] activityIDs)
 
Off the Activities namespace?
I'd be interested to hear back if this works for you.
Vivek
Vivek Gargav
Caldere Associates Ltd.
www.caldere.com
vgargav@caldere.com
My Blog
Nickel Super Contributor
Posts: 441
Country: UK

Re: Deleting and activity

Hi Vivek,
Thanks for having a look, I'm off home now but I'll have a go tomorrow and let you know if I can get it to work.
 
Tom