Quantcast
Viewing all articles
Browse latest Browse all 3066

Error when referencing user defined field in another folder

I don't understand this and I hope someone can help.

The vbscript code below is in a custom task form which is opened from a custom mail item form 'OrgTicket'. It works as long as the OrgTicket is in the folder Support. But if if the support ticket is used in another folder, if fails at the last line which compares the user defined field values that the task has against the OrgTicket items (the idea is to associate the task with the OrgTicket. Why? The TicketNo value is a simple integer like 12345.

    Set AllPublicFolders = PublicFolders.Folders("All Public Folders")
    Set SupportFolder = AllPublicFolders.Folders("Support")
    Set MyItems = SupportFolder.Items
    Set MyTicketItems = MyItems.Restrict ("[FormType]='OrgTicket' ")

    For i = 1 to MyTicketItems.Count
        If MyTicketItems(i).Userproperties.find("TicketNo").value = Item.Userproperties.find("TicketNo").value Then



Viewing all articles
Browse latest Browse all 3066

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>