J
Jeff Graves
Nearly finished with our "Outlook ticketing system." The last piece of
the puzzle is to display lists of tickets based on information stored
in our SQL database (assigned to, status, etc). I believe the best way
to achieve this is using the Outlook View Control on the public folder
and using the Filter property of the ActiveX object. The Transport
Agent I wrote appends a custom x-header with the ticket number and
updates appropriate info in SQL. Using OutlookSpy, I can see the
property on the message and it gives me a DASL syntax of:
http://schemas.microsoft.com/mapi/string/{00020386-0000-0000-C000-000000000046}/x-ticketnumber
And the value of the ticket number. However, using this in my filter
doesn't return any results:
objViewCtl.Filter = "http://schemas.microsoft.com/mapi/string/
{00020386-0000-0000-C000-000000000046}/x-ticketnumber = '75'"
In fact, if I do this, all emails show up:
objViewCtl.Filter = "http://schemas.microsoft.com/mapi/string/
{00020386-0000-0000-C000-000000000046}/x-ticketnumber IS NULL"
I found that the DASL filter doesn't work for any properties where the
hexadecimal tag value is greater than &H8000 and a few other random
ones (like "x-ms-exchange-organization-authsource" and
"urn:schemas:mailheader:message-id", including those generated by
Outlook or Exchange. Is this a known limitation? We also append the
ticket number to the subject, so I *could* filter on that, but I think
this might be MUCH cleaner if I can just access the property directly.
the puzzle is to display lists of tickets based on information stored
in our SQL database (assigned to, status, etc). I believe the best way
to achieve this is using the Outlook View Control on the public folder
and using the Filter property of the ActiveX object. The Transport
Agent I wrote appends a custom x-header with the ticket number and
updates appropriate info in SQL. Using OutlookSpy, I can see the
property on the message and it gives me a DASL syntax of:
http://schemas.microsoft.com/mapi/string/{00020386-0000-0000-C000-000000000046}/x-ticketnumber
And the value of the ticket number. However, using this in my filter
doesn't return any results:
objViewCtl.Filter = "http://schemas.microsoft.com/mapi/string/
{00020386-0000-0000-C000-000000000046}/x-ticketnumber = '75'"
In fact, if I do this, all emails show up:
objViewCtl.Filter = "http://schemas.microsoft.com/mapi/string/
{00020386-0000-0000-C000-000000000046}/x-ticketnumber IS NULL"
I found that the DASL filter doesn't work for any properties where the
hexadecimal tag value is greater than &H8000 and a few other random
ones (like "x-ms-exchange-organization-authsource" and
"urn:schemas:mailheader:message-id", including those generated by
Outlook or Exchange. Is this a known limitation? We also append the
ticket number to the subject, so I *could* filter on that, but I think
this might be MUCH cleaner if I can just access the property directly.