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 ??
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.
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”.
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