How to add User-defined fields in folder?

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

How to add User-defined fields in folder?
 
Vladimir Chtchetkine


Guest


Hi everyone!
How (within an Add-in, in runtime) can I add “User-defined fields” in folder? My understanding was (and still is) that when I add a UserProperty to an item’s UserProperties in folder and set AddToFolderFields param to “true” this (i.e. adding that property to user-defined fields) should be done automatically. But somehow this is not happening. Property gets added to the item’s UserProperties but is not added to the folder’s fields list. Where should I look at in order to fix that?

TIA,

Vladimir
Posted 21 Oct, 2004 16:12:39 Top
Vladimir Chtchetkine


Guest


... it seems that I get this problem only when I add properties on an item that is stored within "private folders" branch... Unfortunatlly, that's the place I want to do that job (for a variety of reasons "public folders" are not acceptable).
So, any ideas how can I fix the problem?

TIA,

Vladimir
Posted 21 Oct, 2004 17:53:59 Top
Sergey Grischenko


Add-in Express team


Posts: 7187
Joined: 2004-07-05
Hi Vladimir,

I have one question. What version of MS Office do you use?
Posted 22 Oct, 2004 07:06:09 Top
Sergey Grischenko


Add-in Express team


Posts: 7187
Joined: 2004-07-05
Hi Vladimir

We have just tried to add a new field. All works fine.
Please check the Show Fields dialog (User-defined fields).
Posted 22 Oct, 2004 07:12:59 Top
Sergey Grischenko


Add-in Express team


Posts: 7187
Joined: 2004-07-05
Vladimir

If you want to show the added field you should change the current view via ActiveExplorer.CurrentView.XML.
More details about the View object you can find on MSDN.
Posted 22 Oct, 2004 07:18:26 Top
Vladimir Chtchetkine


Guest


Sergey:

I tried on Outlook 2002 (10.2627.3501) SP1 (seems to be the same in Outlook 2003). I do change XML schema and I do see my columns appeared in the items pane but they are useless (they don't bind to item props). And they don't appear under "User-defined fields in this folder" (that's probably why they don't bind). My understanding was that when I add UserProperty to an item with flag "AddToFolderFields" set, this property (potential column) would be available in the user-defined list. And that's true for public folders (at least I had no problems in there) but when it comes to private folders there is nothing I can do (programmaticaly) to add those %&$^% fileds to the list of folder fields. I can do it manually (and then they will bind) but not programmaticaly....
Posted 22 Oct, 2004 09:53:42 Top
Eugene Starostin


ADX Team
Add-in Express team


Posts: 430
Joined: 2004-04-05
Vladimir,

BTW: Are you an ISDEF member?
Posted 22 Oct, 2004 10:00:25 Top
Vladimir Chtchetkine


Guest


Eugene:

Que's que cest "ISDEF"? I used to be a komsomol member but in there I’ve developed a strong idiosyncrasy to memberships :-)
Actually, I’m new to Office integration stuff. My background was (and still is) kernel mode development (file systems in particular). But currently there are not much tasks in this area in our company. Well, to make a story short, I’ve been asked to look into Outlook integration to see what we can do in there. And here I am. So, it would be great if you could point me to some helpful resources (inet, books, newsgroups, etc.) where I can ask Qs and get As (practical).

Regards,

Vladimir
Posted 22 Oct, 2004 10:11:29 Top
Eugene Starostin


ADX Team
Add-in Express team


Posts: 430
Joined: 2004-04-05
Vladimir,

I asked about ISDEF because we have special offers for them. Otherwise we cannot take up your problem for long.

As for your question.

I have tried to add a new field on my PC. Works fine. I have Outlook 2002 SP3. Pseudocode:

- get user properties for Item(1)
- add a new field
- create an XML node for the field column
- CurrentView.XML = XMLNode
- CurrentView.Apply

What is wrong here?
Posted 22 Oct, 2004 10:44:48 Top
Vladimir Chtchetkine


Guest


Eugene:

1. Did you do this under "Private Folders" branch? ('cause again, I also can successfuly add fields under "Public Folders" branch)
2. Security? I've noticed that folders under "private" branch have no "UserPermissions" property (NULL)

Does this ring any bells?
Posted 22 Oct, 2004 11:01:30 Top