Hi
I want to know how to create a script that will give sequential reference numbers on the body of the email each time a users hit new memo . It is basically a common mail file for multiple users and I want to implement a reference number on the email automatically when a user hit new memo
ie Something like this “ER - 0001” at the top and then so on . So the next user generates an email from the common mail which would be “ER - 0002”.
Subject: Create Sequential Numbering on emails sent from a mail file
Are these multiple users using on different machine simultaneously?If they are, you’ll have to write a bit of refcoird locking to go around this
The simplest way is to create a Profile document, with a field to hold the number you want
Then you can add some code to the memo form you are using to open the Profile doc, get the value, use it in your mail, update ithe profile doc, then save it
BUT… What if the user hits new memo, and then doesn’t send the memo - do you still want the number to go up by one?
You’ll have to consider carefully where you put the code - if it’s in the QueryOpen or PostOpen then it will run and update the sequential number even if the document isn’t sent
If on the other hand you put it in the Mailsend rouytine, then it only gets updated when a mail is actually sent
Chris
Subject: RE: Create Sequential Numbering on emails sent from a mail file
Yes there will be multiple users using the same db. If a user hits a new memo then does not send then that is is fine if it still increments as the old ones we use still do that and is easier to set up. Can you explain how to go about what you said to create a profile doc and then add teh code in the memo form to open Profile doc and do all that ??? From a notes novice …
Subject: RE: Create Sequential Numbering on emails sent from a mail file
Look in the Help fileSearch for Profile Document
Read the pages & copy the code