Properties removed from PropertyAccessor sometimes "resurfacing"?

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

Properties removed from PropertyAccessor sometimes "resurfacing"?
Issue with Sent Items - Outlook 365 - Cached Exchange Mode? 
Pino Carafa




Posts: 81
Joined: 2016-09-28
By the way... I tried using _MailItem but had no joy with that.
Posted 15 Oct, 2019 06:07:37 Top
Andrei Smolin


Add-in Express team


Posts: 16670
Joined: 2006-05-11
In my case, the warning is gone on all the items after a while. The UserProperty is gone, too. That is, Outlook (or rather Exchange) has resolved the conflict in this way; meaning, you should not modify the item in the ItemAdd event.

What is your final goal? Would it be okay for you to add something to the interned header before the item is sent (say, in the ItemSend event) and then grab this something in the ItemAdd event? Note that that something will be available for the email recipients as well. I've googled out this topic: https://www.add-in-express.com/forum/read.php?FID=5&TID=14156 (HA-HA-HA).

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 15 Oct, 2019 06:19:15 Top
Andrei Smolin


Add-in Express team


Posts: 16670
Joined: 2006-05-11
Another way to check is: use PropertyAccessor to create a custom named property, not a UserProperty.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 15 Oct, 2019 06:27:02 Top
Pino Carafa




Posts: 81
Joined: 2016-09-28
LOL that is very funny indeed but yes, there is the root cause of the problem.

We actually do exactly that - thank you once again for the suggestion you made at the time.

We set Internet headers in the ItemSend event, and we pick them up later in order to do something when the item appears in the Sent Items. All that is working very well.

We write software for solicitors who work with "cases" and each "case" has a "case code". When the user wants to send an email relating to a specific "case" they can select that "case" while composing the email, and we add information using the PropertyAccessor.

All of that is working very well, and when the user then Sends the email and it arrives in the Sent Items, we can use the Property Accessor to decide whether we need to process the email and store it in our "case management system".

BUT

At that point we DO need to set a UserProperty. The reason for that is that the user can then use the Field Chooser on the Sent Items View, and they can pick the User Properties we created - for example the "Case Code" - ... And that's why we can't have User Properties disappearing on us after we set them.
Posted 15 Oct, 2019 06:34:49 Top
Andrei Smolin


Add-in Express team


Posts: 16670
Joined: 2006-05-11
Considering the way Outlook synchronizes data with Exchange and the absence of clear indications of when the process starts and finishes, I think there's no solution to this.

I suppose that 20 seconds may not be enough if there's a connectivity issue external to that machine.

I've also found that you may observe the result of the conflict resolution using MailItem.AutoResolvedWinner and MailItemIsConflict; see https://docs.microsoft.com/en-us/office/vba/api/outlook.mailitem.autoresolvedwinner and https://docs.microsoft.com/en-us/office/vba/api/outlook.mailitem.isconflict. I don't know what to do with these, however.

At the moment, I don't have other ideas.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 15 Oct, 2019 10:21:11 Top
Andrei Smolin


Add-in Express team


Posts: 16670
Joined: 2006-05-11
Hello Pino,

When you search something in Outlook, it shows the Search context tab. There's the Indexing Status button under Search Tools. The button works as follows. Whenever Outlook finds many non-indexed items (say, after you delete an .OST file), clicking Indexing Status shows the number of item still to be indexed. That is, Outlook is indexing the items in the background; you click the button and the code behind the button finds how many items are to be indexed and returns the result. Note that the button doesn't reflect the status of indexing (="it doesn't receive an event when the indexing is complete"); instead, it creates an answer to this question "How many items to index do you have?" *whenever* you ask it.

A suggestion. You can make the users used to some items not having that user property. I would add it after 30 seconds and check if doing this creates a conflict. If there's a conflict, you try to create the user property next time/session/whatever. That is, the user property gets added to all the items but not immediately. To let the user ask what's the case ID of this item", you could provide a context menu button that would read the Internet header and supply the user with the case ID. In addition, if the user switches to that folder and that user property is listed in view fields, you could show a pane informing the user about the context menu button and that the user property would be added when possible.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 16 Oct, 2019 03:35:58 Top
Pino Carafa




Posts: 81
Joined: 2016-09-28
Thanks Andrei I think we'll have to take that kind of an approach alright. Our customers won't be perfectly happy but at least we can point them at this thread if they ever wonder why we can't give them *everything* they want :)
Posted 16 Oct, 2019 05:24:23 Top
Andrei Smolin


Add-in Express team


Posts: 16670
Joined: 2006-05-11
Alas, everything is not possible.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 16 Oct, 2019 06:38:18 Top