Q
Problem solve Get help with specific problems with your technologies, process and projects.

Code to count email recipients won't permit saving of email

I have the requirement to go through each sendee of a mail (whether it be a group or an individual) and count how many people are going to receive the e-mail. If the total is greater than 50, I need to prompt the user to acknowledge that they meant to send it to that many people. I get the code to count and to prompt, as well as to send the e-mail.

My problem is that it will not save the e-mail if the user either chooses to save it (if their preference is to always prompt on send) or save it automatically (if their preference is to always keep a copy). I have checked to make sure the saveoptions flag is set to "1" , and since it is, I am at a loss. Below is my code. Can you see the issue?

Note from SearchDomino: The field for posting an Ask the Expert question could not accommodate this code, which was quite lengthy, in its entirety. If you would like to see the code, please send a note to editor@searchdomino.com
You didn't mention exactly where all this code is located, but since you have a "Click" subroutine, I'm guessing it's in an action button. That's the wrong place for it, since people can send the message without using your button.

Basically, what you're doing is trying to decide whether a "send" of the message can proceed. You don't want to affect saving one way or the other, so that users can save drafts without being prompted. I think you should use the form Querysend event, which will execute whenever the user tries to send, even if it's not by clicking your action button. Querysend lets you stop the send from happening by setting Continue = False. This ought to work the way you intend, although I have to admit it's not something I've had occasion to try for myself.


Do you have comments on this Ask the Expert question and response? Let us know.

Dig Deeper on Lotus Notes Domino Application Development

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchWindowsServer

Search400

  • iSeries tutorials

    Search400.com's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...

SearchDataCenter

SearchContentManagement

Close