Hi, you understood my question correct.
Only my issue is a little bit more complicated.
I have 2 GW mainwindows open
1. the mainaccount mailbox (Jan Cromwijk)
2. a proxied mailbox (test)
This are the steps I am walking:
– I am creating an e-mail in the mainaccount mailbox window
– when creating it I am switching to the window with the proxied mailbox
(Client.clientstate.currentaccount.proxied = true)
– Then I go directly back to my message without activating the mainaccount window
(Client.clientstate.currentaccount.proxied STAYS true)
– After finishing the message I sent it.
On the ‘before send event’ a small applet gets the accountname related to the message
sAccountName = GroupWise.ItemGetText(“X00”, itfFrom)
Utilities.TransferData = sAccountName
– The applet I wrote to sort send e-mails to the right projectfolder starts on ‘the after send’ event.
– It looks if the account is proxied and sees it is proxied so it goes looking in the proxied account for the folder to sort to.
The message is created in the main account, thus it must get the folders in the mainaccount.
To fix this issue I read out the Utilities.TransferData to a sAccountName
Then I want to check to following:
– is the current accountname the same as the accountname in the variable
– if it is different then activate the correct mailbox to get the correct folderlist.
When I use the code you suggest then switching to the proxied account (test) works fine. But when switching to the mainaccount I got a message that I have no rights to proxy to that account.
Another not wished effect is that the currently active window gets the proxied account so when switching to the proxied the window with the mainaccount is switched to the proxied so I have two windows with the proxied account.
I hope you understand the issue and can help me to solve this adventure.