Solved

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

Posted on 2010-11-22
8
560 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
Technology Partners: 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

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!

Question has a verified solution.

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

This is an old article, please see an updated version of this article, located here: http://www.experts-exchange.com/articles/23619/Notes-8-5x-Windows-7-Notes-info-and-tips.html
Lack of Storage capacity is a common problem that exists in every field of life. Here we are taking the case of Lotus Notes Emails, as we all know that we are totally depend on e-communication i.e. Emails. This article is fully dedicated to resolvin…
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

696 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