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
Solved

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

Posted on 2010-11-22
8
556 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
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
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Migrating Exchange 2003 organization to new 2010 organization 12 77
Lotus Notes - Open specific view in frameset (right side) 2 247
Domino Server 2 80
problem with deleted user 14 28
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…
This article covers general Notes 8.5 troubleshooting information including recreating the Notes\Data folder.
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

856 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