werkilla
2009-07-01T12:38:00Z
Hello,

is it possible to mark a MailItem after "Store Item"? (For example a flag or a different icon)
Does a property change or is it any event fired so that i can run a Macro in that situation?

Info:
Multi User Business License
Version:4-2000(400801) Multi-Byte build.Outlook version 11.0.0.8169

Thank you in advanced!
Sponsor
GeniusConnect documentation search (User Manual Downloads...)
Administrator
2009-07-01T13:04:00Z
Hello,

once an item has been stored to db, GeniusConnect adds 2 custom fields on MAPI level, OCMPRIMNAMES and OCMPRIMVALUES.
In your macro/script you can check for this values (UserProperties) and change for example a flag/category.

Please note:
When Auto.Save is on, your change will cause an MAPI change event and GeniusConnect will resave the changes to DB.
werkilla
2009-07-08T10:33:00Z
Hi,

I've checked for this fields before and after storing an item, and they are always empty.
Exactly which values are added?

Thanks again!
Administrator
2009-07-08T10:46:00Z
OCMPRIMNAMES: Name of primary key column(s)
OCMPRIMVALUES: Primary key value(s)

You can check these values(and any other MAPI props) with this tool:
http://www.geniusconnect...es/Otherproducts/2/4/62/ 
werkilla
2009-07-08T11:34:00Z
can I get more information about this properties?
type, id .. ?

Thank you
Administrator
2009-07-08T11:44:00Z
datatype (both) is PT_STRING8, value depends on your configuration/definition of primary key in Assign Table->Mandatory Keys.

Example:
Primary key column: myID
record value: 100

OCMPRIMNAMES=myID
OCMPRIMVALUES=100
werkilla
2009-07-08T13:35:00Z
I'm using CDO and

Set prop = MAPI.Message.Fields(OCMPRIMNAMES)

and prop is always empty

I'm using a custom form, could this be the problem?
I've read in other posts that there might be problems with custom forms, in which outlook might not write the new fields.

But if that's the case, could I update the items anyway?
Because I can do that.
Administrator
2009-07-08T14:02:00Z
Please use this tool:
http://www.geniusconnect...es/Otherproducts/2/4/62/ 

To check the real values.
This tool will install a new toolbar in Outlook, select the Item/message in Outlook and hit IMessage toolbar button.
It will list all MAPI props, including custom GeniusConnect props.

If the props are OK, something is wrong with your CDO code.
If they are empty(or they do not exist), something maybe wrong with permissions etc...

You can also chect it by:
-selecting the item
-hit Store Item button

If geniusconnect inserts instead of updating the DB record, the custom props are missing.
werkilla
2009-07-08T14:33:00Z
I got it!

I was missing quotes "" in my code:
Set prop = MAPI.Message.Fields("OCPRIMNAMES")

and the properties are saved like OCPRIMNAMES / OCPRIMVALUES and not OCM-

Thanks a lot!
Similar Topics