Not seeing any event on a drop to folder from subfolder

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

Not seeing any event on a drop to folder from subfolder
 
Steve Obarowski




Posts: 16
Joined: 2017-01-24
Here's the scenario:

We have folders that we create based on database data. Let's say those folders are as such (using dots to show hierarchy):

Docstor Legal Navigation (at same level as inbox)
...Matter 1
......Document Group 1
.........Doc Group Subfolder
......Document Group 2

The folders at matter level and below are set up connected to the same DragEvents handler.

Now let's say I have this:
Inbox
...Inbox subfolder

The behavior I'm seeing is as follows:

Dragging an email from Inbox:
to Document Group 1 - BeforeItemMove event
to Doc Group Subfolder - BeforeItemMove event
to Matter 1 - BeforeItemMove event

Dragging an email from Inbox subfolder:
to Document Group 1 - ProcessItemChange event
to Doc Group Subfolder - ProcessItemChange event
to Matter 1 - NO EVENT (I have put in every override function and set breakpoints, and nothing happens)

I was trying to figure out what I was doing differently for the matter folder, but the fact that I get the event when dragging from the inbox (or any folder at the same level as the inbox) makes me think it is set up correctly. Is there anything I might be doing in the setup that would cause a drop from a subfolder to behave differently than a drop from a subfolder?

FYI, I think I have gotten around the issue of the delay mentioned in another topic. Once I put in all the override functions, even though they just call the base functionality, everything seems to work better.
Posted 01 Jun, 2017 09:42:27 Top
Andrei Smolin


Add-in Express team


Posts: 14138
Joined: 2006-05-11
Hello Steve,

Steve Obarowski writes:
Dragging an email from Inbox subfolder:


Do you mean "dragging an email from a subfolder of the Inbox folder"? If so, check that you connect to the events of the Items collection of that subfolder.

You haven't described the task you solve. I suppose you try to get informed on dragging an item from the source folder to a target folder. If so, not getting an event for a given folder means you need to connect to events of that folder. That is, since you don't receive the BeforeItemMove event when dragging an email *from* a subfolder of the Inbox folder, you need to connect to the events of that sub folder. In the same fashion, since you get no ItemChange event when dragging *to* a folder, you also need to connect to events of that folder.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 01 Jun, 2017 10:19:50 Top
Steve Obarowski




Posts: 16
Joined: 2017-01-24
Thanks, I think I finally figured it out. First off, I did not write this code, I am doing maintenance. So I'm basically learning on the fly. I was not aware that they were putting the DragEvents handler on the existing folders, I thought they were only going on the folders we created. As it turns out, they are looping through the first level of folders off the root and attaching the event handler, but they are not going into the child folders. Thanks to your mention of handling the source folder events, I was able to find it.
Posted 01 Jun, 2017 14:14:52 Top
Andrei Smolin


Add-in Express team


Posts: 14138
Joined: 2006-05-11
You are welcome.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 02 Jun, 2017 03:33:27 Top