Email button

We would like to send an email to all users for a new server connection document and allow them them click a button to update thier documents. That code we have. What we would like to is to avoid them clicking it to many times. Is there any code that would allow them to click the button once and then exit the email and not allow them to click the button again ??

thanks in advance

Subject: email button

Add code at the end of the process to set an environment variable in their Notes.ini file when the process is completed.

Add code at the beginning of the process to check for that environment variable and exit if it is already set to the “processed” value.

Designer help contains all the info you should need about setting and accessing environment variables, whether from formula language or Lotusscript.

Subject: RE: email button

sorry kinda new at this, not sure what you mean by setting and accessing environment variables. We have looked through the help files and have not seen anythig that would do what we need.

Subject: RE: email button

Envrironment variables in Notes are pretty much the same concept as any other type of environment variables. From the LotusScript help: “Environment variables are useful for saving state and data between sessions on a single server or workstation”. This is what you want to do, you want to save an indicator telling you that they have already run this process.

Open Domino Designer Help (not Notes client help) and go to the Index. Type “env” and press enter to navigate to the general area you wiill need.

Expand the Environment Variables category.

If you are using formula language, expand the Formula language topic and read the item titled “Getting and setting environment variables”.

If you are using Lotusscript, expand the Lotusscript classes topc and read the item titled “Using environment variables”.

Subject: RE: email button

We looked could not find anything to help. Will look for the code someplace else.thanks

Subject: RE: email button

don’t use an environment variable. Just do a lookup in the local names.nsf to the Connections view to see if the connection already exists and if it does then exit the script. something like this should work:

Dim view as NotesView

Dim doc as NotesDocument

Set view = db.GetView("Connections")

Call view.Refresh

Set doc = view.GetFirstDocument

While Not (doc Is Nothing) 

	If doc.Destination(0) = "CN=MAIL1/OU=SERVER/O=ACME" Then

MsgBox “Required connection already exists”

		Exit Sub

	Else

		Set doc = view.GetNextDocument(doc)

	End If

Wend