Solved

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

Posted on 2010-11-22
8
553 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
 
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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

For users on the Lotus Notes 8 Standard client, this article provides information on checking the Java Heap size and adjusting it to half of your system RAM in attempt to get the Lotus Notes 8.x Standard client to run faster.  I've had to exercise t…
I thought it will be a good idea to make a post as it will help in case someone else faces these issues. I trust this gives an idea how each entry in Notes.ini can mean a lot for the Domino Server to be functioning properly. This article discusses t…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

706 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now