Form Cache

J

Joel Allen

Hello,

Having form cache problems on Outlook 2003 in public folders.

No problem whatsoever if I run the form via Terminal Server. What is
different about Terminal Server vs. the local that would free up any errors?

Thanks for your help.

Joel
 
S

Sue Mosher [MVP-Outlook]

Forms cache on TS wouldn't be persistent between sessions. Less chance of corruption.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
J

Joel Allen

Do you have a suggestion as how to fix it?

Forms cache on TS wouldn't be persistent between sessions. Less chance of
corruption.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
S

Sue Mosher [MVP-Outlook]

You haven't described the actual problem with any detail yet.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
J

Joel Allen

I'm sorry, here goes:

I am developing task management in Outlook, where I am using Outlook forms.
I have one form which is sent from users to one e-mail address where it
will
be processed like tasks (not standard Outlook tasks). There are about 10
operators which can process this task so I have implemented a control based
on a
mail flag. This control will check if is form opened by another user and
prevent it from duplicate processing. The problem is that Outlook is
caching the
form and when I open a form by one user, Outlook will cache this state and
he
will use this state everytime when I open it from this one user, so he is
not
accepting changes (about flag on mail) which are made by another user.
Outlook
accepts changes only after a restart. This is causing Conflict
messages and so on.

- I think that this work properly if I was able to disable
this Outlook feature about remembering the state of forms but I don't know
how to
do it.



Now when all the users run tasks from TS, none of these problems happen
whatsoever - it's just that I can't have them working from TS all the time.



Hope that made sense,

Joel


You haven't described the actual problem with any detail yet.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
S

Sue Mosher [MVP-Outlook]

What build number of Outlook 2003? Unless you've installed at least SP1, you can expect plenty of problems with custom forms in public folders.

However, caching a form definition (i.e. the forms cache) and caching an item are two entirely different issues, and the symptoms suggest that your problems center on caching items. Is this a custom ActiveX control you're using? Maybe it's not properly releasing the Outlook item when the user is finished with it?

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
J

Joel Allen

No it's not an Active X item. Also, I have Outlook 2003 SP1 and have turned
of Cache Mode, restarted and that doesn't fix it.

This might be another clue: When holding the shift key down when opening the
form, the code still runs - it is not suppose to do that.

Thanks for your time,

Joel

What build number of Outlook 2003? Unless you've installed at least SP1, you
can expect plenty of problems with custom forms in public folders.

However, caching a form definition (i.e. the forms cache) and caching an
item are two entirely different issues, and the symptoms suggest that your
problems center on caching items. Is this a custom ActiveX control you're
using? Maybe it's not properly releasing the Outlook item when the user is
finished with it?

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
S

Sue Mosher [MVP-Outlook]

Maybe you can tell us more about what you mean by:

" a control based on a mail flag. This control will check if is form opened by another user and prevent it from duplicate processing."

A code snippet could be helpful.

You are connecting to an Exchange mailbox directly, not in Cached Exchange mode? Where is the form published?
--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
J

Joel Allen

Perhaps Mail flag was the wrong way to explain it. I have a field that I
populate that will prevent others from saving when someone else is in the
form.

I have cache exchange mode off. The form is published in All Public
Folders.

Here' a code snipit:

Function Item_Write()

On Error Resume Next

if Item.UserProperties("Oppen2") <> "" then

Item_Write = False

MsgBox "Hey! You can't save because someone else is already in the task. Try
again some other time!"

end if

End Function



Function Item_Open(ByVal Name)

On Error Resume Next

if Item.UserProperties("Oppen") = "" then

Item.UserProperties("Oppen") = "Open"

Item.Save

else

Item.UserProperties("Oppen2") = "DO NOT SAVE WHEN EXITING!"

end if

End Function



Function Item_Close()

On Error Resume Next

if Item.UserProperties("Oppen2") = "" then

Item.UserProperties("Oppen") = ""

Item.Save

End If

End Function


Thanks,
Joel

Maybe you can tell us more about what you mean by:

" a control based on a mail flag. This control will check if is form opened
by another user and prevent it from duplicate processing."

A code snippet could be helpful.

You are connecting to an Exchange mailbox directly, not in Cached Exchange
mode? Where is the form published?
--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
S

Sue Mosher [MVP-Outlook]

Outlook does some internal caching of items that the user opens. Usually, if the user opens an item and doesn't see the most recent changes (e.g. the Oppen property being set back to ""), the problem can be avoided by closing that item and opening another item, then opening the problem item.

I don't know why you'd see different behavior on Terminal Server. There is no setting to control this caching behavior.

Just a wild hunch, but try adding this statement to the end of the Item_Close procedure:

Set Item = Nothing

I don't really think it will help, but somewhere in the back of my mind I recall some scenario where releasing the intrinsic Item object was possible and did help.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
J

Joel Allen

I'm sorry Sue, the Set Item = Nothing did not work.

When I shut down Outlook and restart, the error does not happen. I seem to
be clearing some sort of memory by doing this that perhaps TS does not hang
on to - and that is why the error doesn't occur in TS.

Instead of shutting down Outlook every time I want to open a task, could
there be a way to programatically clear any memory of this sort the instant
before a task is opened?

Thank you so much for your help,
Joel


Outlook does some internal caching of items that the user opens. Usually, if
the user opens an item and doesn't see the most recent changes (e.g. the
Oppen property being set back to ""), the problem can be avoided by closing
that item and opening another item, then opening the problem item.

I don't know why you'd see different behavior on Terminal Server. There is
no setting to control this caching behavior.

Just a wild hunch, but try adding this statement to the end of the
Item_Close procedure:

Set Item = Nothing

I don't really think it will help, but somewhere in the back of my mind I
recall some scenario where releasing the intrinsic Item object was possible
and did help.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top