none
10% of the time new items are created with wrong message class RRS feed

  • Question

  • I'm working with a Public Folder on Exchange 2007. For several years we've had an Outlook 2007 custom form that's used to work with items in this folder. A week ago I updated the custom form and went from about 30 fields on 2 tabs to 60 fields on 4 tabs on the form. Since then, about 10% of the time when a new item is created it gets a MessageClass = TASK instead of TASK.MYFORM. I found out about this because command buttons that run VBScript won't run on the form if its MessageClass = TASK.

    I made a VBScript command that examines each item in the folder and if needed changes the MessageClass to be TASK.MYFORM. Then the items works properly.

    I can't figure out what's causing the problem. I've deleted everyone's form cache file. There doesn't seem to be a pattern to the users with the problem. I've seen the same user create one properly, the next one has the wrong MessageClass, then the 3rd item has the correct MessageClass.

    The form resides in the Organization Forms Library. I tried copying it to the Public Folder and changing the Public Folder's property to force all items to use this form, but it didn't change the behavior.

    Any ideas how to troubleshoot this and force all items to be created with the MessageClass of TASK.MYFORM?


    Gordon Prince * (901) 761-3393
    Monday, January 30, 2012 4:42 PM

Answers

  • I tried adding this code to the form:

    Function Item_write()

    if me.MessageClass = "IPM.Task" then

       me.MessageClass = "IPM.Task.NewCall"

    end if

    which seems to have worked in my testing. Actually for testing I simply had it change the item back and forth, which it did every time I saved it. This seems better than the suggestion to display a message to the user and have them go do something. If I can do it automatically, that is better.


    Gordon Prince * (901) 761-3393
    • Marked as answer by Gordon Prince Friday, February 10, 2012 7:46 PM
    Friday, February 3, 2012 12:28 PM

All replies

  • This definitely sounds like a forms cache problem, which were quite prevalent pre-Outlook 2007.  I assume that the custom form is set as the default for that folder?  It's also possible that the messages are becoming "one-off" forms somehow; see the end of the page from the last link:

    How Outlook 2007 uses the forms cache and how to troubleshoot forms cache problems:
    http://support.microsoft.com/kb/919596

    Saving and Publishing Outlook Forms:
    http://www.outlookcode.com/article.aspx?id=34


    Eric Legault
    MVP (Outlook)
    About me...
    Monday, January 30, 2012 5:18 PM
    Moderator
  • Thanks for the suggestions. I checked everything mentioned in the articles and the only thing I think I should change is to copy the form to Public Folder and set the Public Folder's properties to only allow this form to be used for new items, which I have now done.

    From reading some of the other comments on this topic, it sounds like rewriting the custom form using Regions might help with this problem. Am I reading the right? I've got everyone in the organization up to Outlook 2007 (or higher), so that might be an option.

    About 30 items/day are created in this folder, so the problem should show up or I'll call it resolved within a day or two.

    Thanks.


    Gordon Prince * (901) 761-3393
    Tuesday, January 31, 2012 12:13 PM
  • Yes, move to Form Regions.  Using .NET instead of VBScript is a good thing.
    Eric Legault
    MVP (Outlook)
    About me...
    Tuesday, January 31, 2012 4:15 PM
    Moderator
  • Yesterday one "one-off" copy was created. Today so far there have been two (out of 40 or so items altogether). I can't see a pattern. But it's definitely not working the way it used to nor the way I want it to. Other than a rewrite to use Form Regions, if anyone has any other suggestions I would appreciate hearing them.
    Gordon Prince * (901) 761-3393
    Wednesday, February 1, 2012 5:59 PM
  • I tried adding this code to the form:

    Function Item_write()

    if me.MessageClass = "IPM.Task" then

       me.MessageClass = "IPM.Task.NewCall"

    end if

    which seems to have worked in my testing. Actually for testing I simply had it change the item back and forth, which it did every time I saved it. This seems better than the suggestion to display a message to the user and have them go do something. If I can do it automatically, that is better.


    Gordon Prince * (901) 761-3393
    • Marked as answer by Gordon Prince Friday, February 10, 2012 7:46 PM
    Friday, February 3, 2012 12:28 PM
  • Did you check to see if any custom fields are being added to the form in the code?  If those fields don't exist in the form definition, then it may be causing the one-offs.
    Eric Legault
    MVP (Outlook)
    About me...
    Friday, February 3, 2012 4:01 PM
    Moderator
  • All the custom fields are in the form's definition. Putting data into a custom field (e.g. the current date/time + username) wouldn't cause this, would it?


    Gordon Prince * (901) 761-3393
    Saturday, February 4, 2012 12:53 PM
  • No.  Only if you're adding "on-the-fly" fields that don't exist in the published form.  A simple search for any ".Add" text in the code to ensure that you aren't adding anything to the Item.UserProperties collection would verify if this is happening.
    Eric Legault
    MVP (Outlook)
    About me...
    Saturday, February 4, 2012 9:56 PM
    Moderator