/ Forums / Advansys Formativ / Creating Solutions with Formativ / Can Formativ be used to change ‘Copies to Self’ behaviour / Reply To: Can Formativ be used to change ‘Copies to Self’ behaviour
There are ways to achieve a pre-send filing option but each approach would have advantages and disadvantages.
To help us better understand your business requirements, would it be possible for you to let us know the objective of the copy-to-self requirement? For example, would moving the GroupWise sent message into a target folder be sufficient or do you specifically need the sent message to also be addressed to the sender, which is then filed into the user’s target folder?
Which version of GroupWise are you using?
Here are some quick, off the cuff suggestions for implementing a system which moves the GroupWise sent item to a target folder, which is selected by the user prior to sending message.
The basic approach would be to mark the outgoing message with the user’s selection and then have a mechanism which identifies the marking and moves the message into the correct folder.
1) Marking the message
1a) Using a Custom Field
Design an applet which allows the user to select a target folder and which then saves the user selection in a custom field into the draft message prior to sending. The catch with this approach is that the draft message must be saved at least once, to get a valid message ID (rather than ‘X00’), before you can add a custom field. The applet could save the message by using the ItemSaveMessageDlg command (or another command depending on the version of GW you are using), which will prompt the user for a draft folder. The applet could be executed manually or integrated with the OnSend event (but again, the draft message must be saved first to get a valid Message ID).
The benefit of using a custom field to mark the message is that the data remains hidden from the user and does not appear in the outgoing message.
1b) Using the Message Fields
Another approach is for an applet to mark either the subject, the message text or by attaching a special file attachment. For example, you could append a special text code to the end of the subject, end of the message text, or add a text attachment which includes the target folder code or location.
The advantage of this approach is that you don’t need to save the message first but the disadvantage is that the target folder code or information would appear in the outgoing message.
2) Idenfiying and filing the message
Once the message is marked with the required target folder identifier, the next step is to develop a process which identifies the marking and then automatically files the message. Again there are a couple of approaches which could be used but to ensure an optimal solution, each approach would need to be tested first.
Note: You can’t have the same ‘marking’ applet move the GroupWise sent message because of the send event sequencing, i.e. when an applet is triggered by the client On Send event, the GroupWise message is not yet committed to the database.
2a) Automatically Generated Rule
The applet which marks the message could generate a GroupWise rule configured to automatically move the sent message, which includes the specific marking, to the target folder. This technique would have to be tested for timing issues. However, as the rule would be created before the message is sent, and because the rule events are POA database (server) driven, the rule ‘send’ event would trigger only when the message has been sent by the client. In any case, once the rule was created, it would work without potential timing problems for any subsequent messages containing the same marking identifier. The outcome of this approach is that, in addition to the marking applet, you will have a number of GroupWise rules created to do the filing.
2b) Filing Applet
The other approach is to use another applet which is either manually executed by the user and/or is triggered to run on GroupWise startup. This applet would scan GroupWise sent messages for the specific markings and automatically move them into the correct target folders.
Summary
The above suggestions focus on the GroupWise sent message, which is normally automatically created by the GroupWise client and by default is stored in the Mailbox folder. If you require that a copy of the sent message is filed, or if the sent message is to be addressed to the sender to achieve a copy, the above approaches could be adapted to work in either scenario.
I hope the above suggestions are of assistance. If you don’t wish to develop this solution yourself, Advansys does offer custom development services.
Regards,
Advansys Support