Solved

Lotus Notes form, if NEW want to send a link email messaged to a assigned users

Posted on 2010-11-22
8
558 Views
Last Modified: 2013-12-18
I have a task database. When users submit tasks I want the person that the task is assigned to(a field that is poplulated with a lookup) to get a link doc email message.  I am thinking when the submitting users does a SAVE, and if the doc is NEW that an email is sent... but I do not know how do put that code on the button.
0
Comment
Question by:Monterey
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
8 Comments
 
LVL 21

Accepted Solution

by:
shuboarder earned 250 total points
ID: 34190009
Hi Monterey,

something like this should do it:

@If(@IsNewDoc;
@Do(
@MailSend(sendTo; copyTo; blindCopyTo; subject; Remark;Body; [IncludeDocLink]);
@Command([FileSave]);
@Command([CloseWindow])
);
@Do(
@Command([FileSave]);
@Command([CloseWindow])
)
)
0
 
LVL 21

Expert Comment

by:shuboarder
ID: 34190033
obviously, you just replace the parameters (sendTo, copyTo etc.) with the names of the fields on your form.

Hope this helps!
0
 
LVL 15

Expert Comment

by:roylong
ID: 34190150
Do you want to send mail when the document is saved?  Is the save executed when the user clicks the button or when the form closes?  e.g. do you have code on the button?

would something like this work?::

@MailSend("user1/domain":"user2/domain";"";"";"A new document has been added to xxxx";"Click on the link to open the new document";"";[IncludeDocLink]);
@PostedCommand([FileSave]);
@PostedCommand([FileCloseWindow])



0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 22

Expert Comment

by:mbonaci
ID: 34190404
And what if the user saves the new document first and then, afterwards, before closing it, decides to submit?
Or if he saves and closes the doc (like a draft) and then opens and submits?

You'll need some kind of flag field (not physical field on the form, only field in the document).
Then, when the doc is first time submitted, change the field to "1". Now you know that the doc is submitted, regardless of users' working habits.

Use something like this for Submit button (there's no need to add isDocSubmitted field to the form):
@If( !isDocSubmitted = "1" ); 
    @Do(
        @MailSend(sendTo; copyTo; blindCopyTo; subject; Remark; Body; [IncludeDocLink]);
        @SetField( "isDocSubmitted "; "1" );
        @Prompt([OK];"Reminder";"E-mail message sent.")
        @Command( [FileSave] );
        @Command( [FileCloseWindow] ) );
    @Do(
        @Command( [FileSave] );
        @Command( [FileCloseWindow] )
    )
)

Open in new window


See here for @MailSend function params:
http://publib.boulder.ibm.com/infocenter/domhelp/v8r0/topic/com.ibm.designer.domino.main.doc/H_MAILSEND.html
0
 
LVL 46

Expert Comment

by:Sjef Bosman
ID: 34195073
An extension to Marko's idea: instead of the isDocSubmitted field use a status field. Many checks and operations tend to get a lot easier when you use such a field.

For example, your task could have the statuses "New" (or ""), "Submitted", "Opened", "Assigned", "Testing", "Complete", "Hold", etc. and the action Save can easily be hidden when status="Complete".
0
 
LVL 31

Assisted Solution

by:qwaletee
qwaletee earned 250 total points
ID: 34196618
Don't forget to save BEFORE sending a doclink. You can't send a doclink to an unsaved document.

Also, in certain situations, creating a doclink will fial if the database does not have a default view. Make sure there's  a default view in the database.
0
 

Author Closing Comment

by:Monterey
ID: 34200105
I put this on my SAVE/Close button
@PostedCommand([FileSave]);
@MailSend(coverage+"/";"";"";"Follow this link to a new Task";"";"This task has been submitted, and is not yet assigned ";[IncludeDoclink]);
@Command([FileCloseWindow])
0
 
LVL 22

Expert Comment

by:mbonaci
ID: 34203962
That will unconditionally send email every time the button is clicked.

So what happened to requirement:

    "...and if the doc is NEW than an email is sent..."

from your initial question?
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

  In today’s Arena we can’t imagine our lives without Internet as we are highly used to of it. If we consider our life style just for only 2 min we found that face to face communication is swapped by e-communication.  Every Where from Works place to…
This article covers general Notes 8.5 troubleshooting information including recreating the Notes\Data folder.
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question