How to write a common functions?

prateekkumar
prateekkumar used Ask the Experts™
on
Hi friends, this is in continution to the questions I was asking. Actually, I am performing some function on the outgoing mails for individual users. For this I am writing some scripts at the QuerySave event of Memo, Reply, ReplyWithHistory, PersonalStationary and wForward forms(means wherever it is possible to send a mail).
   Now if I have to make some changes in it then I have to change the scripts in all five forms. Can I make some sort of functions which can be called in all five forms and if I have to make any changes then I have to change at a single function which is called in all five forms? Please tell me in detail as I am not a expert in Lotus Notes?

ps: Please don't suggest to not to use this method of writing lotus script in all five forms as I have already implemented it.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Create a Script library and have a function there. You could USE this library and refer to the functions from all of your five forms.

And in case of modifications all you have to do is modify the script library and you will be all set !

Good Luck!
Arun is dead spot on here.  GO script libraries.

Even better, put the script library in a template on your server, and let the mail files you have inherit the changes each each night or any time you run the "design" task on the server.

Change once, run design, and its rolled out everywhere.

Author

Commented:
Thanks Arun, it's running perfectly.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial