This is an address-book type of database for maintaining customer/supplier contacts.
The contact form has a field called ‘email’ to record the mail address.
There is a view that displys contact info using various columns - one of which displays contacts phone, e-mail, etc.
A user in this view should be able to select one (or more) contacts, click on an action button that should open up a blank new memo window that automatically prefills the e-mail addresses of the contacts that were selected from the view.
I tried @MailSend - it opend up a new memo that had the actual contact form in the body of the memo with a blank ‘To’ field.
What I am looking for is something similar to Notes Address Book’s “Write Memo” shared action - that basically allows you to select contact (s) from PAB and launch a new memo that has their e-mail address pre-filled.
I don’t think you will be able to do this with @fuctions and @commands. You’ll have to do something with LotusScript.
Not very hard, loop through the selected documents to get the e-mail list. Compose a document in the background and then bring it to the front.
This is exactly what is done in the agent: CreateMailMemo in your personal address book. Just take a look at that code and “copy it” and copy the Script Libarary MailLibrary. You probably only need to change GetMailAddress to just pull the address from your email field.
Also GetMailAddress Only pulls the first address, so if your contacts have multiple addressed in them, well you’ll need to tweak the code a bit more.
I believe the problems is you’re assuming the evaluation of SendTo will happen BEFORE the @Command. Unforunately that’s not always the case. Change the @Command@PostedCommand and see if that helps.
this is a built in feature of Notes. Look in the People view of the Personal Address book. There’s a button at the top of the view called “Write Memo”. Just check the code behind the button. There’s an agent and a script Library you’ll need to copy to your contact directory.