ProcessRead and ProcessBeforeDelete not firing

Add-in Express™ Support Service
That's what is more important than anything else

ProcessRead and ProcessBeforeDelete not firing
Working with appointment drap/drop/resizes 
nfsadx




Posts: 56
Joined: 2006-07-21
Hi,

I am a newbie to your excellent looking product so any answers should hopefully be trivial. I am using your OutlookItemEvents example ("C:\Program Files\Afalinasoft\Add-in Express .NET\QDemo\VS.NET 2003\Advanced\OutlookItemEvents") to understand how eventing works with your product.

We currently have a traditional OL customised appointment form which has code in the Item_Read() and Item_BeforeDelete() events that are activated when the item is changed BUT NOT OPENED. The 3 scenarios being:
1) in a table view, a value is changed
2) an item is resized in the calendar
3) an item is moved in the calendar

In the example's ProcessRead event handler, I have put a MessageBox.Show but this does not fire in any of the scenarios above. Please advise asap.
Posted 24 Jul, 2006 05:16:22 Top
Sergey Grischenko


Add-in Express team


Posts: 7230
Joined: 2004-07-05
Hello.

The fact is that the ProcessRead event handler fires when an Outlook item is opened. Double click on the item an you will get the message box.
Posted 24 Jul, 2006 09:27:45 Top
nfsadx




Posts: 56
Joined: 2006-07-21
Hi Sergey,

So the triggering of the ProcessXXXX events in the Add-Ins are not the same as they are for a custom form. This may be a big problem for us as we have functionality in the Item_Read and Item_BeforeDeleted event that we need to move to one of your Add-Ins. The code ensures that a web service is updated if a person changes the times or deletes the item. How else can I get around this issue i.e. what common event fires in the scenarios given above?
Posted 24 Jul, 2006 09:40:59 Top
nfsadx




Posts: 56
Joined: 2006-07-21
Hi Sergey,

Looking at the demo outlook folder itemS events solution, I understand what is going on and why the item event class is not in the picture unless an item is open.
Using a class that : ADXOutlookItemsEvents, I have noted the following events are fired for the scenarios below:

1) in a table view, a value is changed - ProcessItemAdd()
2) an item is resized in the calendar - ProcessItemChange()
3) without opening it, an item is moved in the calendar - ProcessItemChange()
4) without opening it, an item is deleted in the calendar - ProcessItemRemove()

With an open item, you can prevent the item from being saved, deleted or closed by setting e.cancel = true. However in the itemS events class' public override void ProcessItemRemove(), I cannot see an obvious way to prevent the item from being deleted. I have seen posts on the forums saying that you can watch the OnItemAdd event of the Deleted Items folder, but that is useless if the person does a shift+delete or has chosen to permanently delete items. So is it possible in all circumstances as it is in a custom form, to prevent a delete or failing that, restore the deleted item? If the answer is no, then how would I go about identifying the deleted item so I could update Web Service?
Posted 25 Jul, 2006 03:09:03 Top
Andrei Smolin


Add-in Express team


Posts: 16662
Joined: 2006-05-11
Harry,

The
appointment forms and events download is actually the same I sent to you in the personal e-mail.

This sample shows how to embed a custom form into the appointment form, how to process appointment item Read and BeforeDelete events, how to process ItemChange event for the folder (this is Calendar in this example.

The sample was created with VS 2005, VB.NET, Adin-Express .NET (ADX.NET) version 2.7, and ADX Extensions for Microsoft Outlook (ADX.X.NET.OL) version 1.3. Both ADX.NET and ADX.X.NET.OL were in the pre-release state at the moment of writing.

HTH
Posted 25 Jul, 2006 10:17:09 Top
Andrei Smolin


Add-in Express team


Posts: 16662
Joined: 2006-05-11
Sorry, I've posted the wrong link. The link should be as follows:

samplecorrect link for the appointments forms and events sample
Posted 26 Jul, 2006 13:20:30 Top