Create HTML mails in SSJS using MIME
See the description at the top of the class for a description on how to use this class or read this article on my blog:
http://linqed.eu/?p=45
JavaScript (Server)
Mark Leusink
Overall rating is 4.86 by 14 person(s)
You have to login first to use 'My Favorites' feature
15 user(s) has marked as favorite:
Eric McCormick
Eric Tomenga
Fredrik Norling
Gavin Luo
Gunawan T Wicaksono
Joacim Boive
Johan Sundin
Leonardo Bertelli LB Bertelli
martin meijer
Michele Malaguti
Mike R Kelly
Niklas Heidloff
Petter Kjeilen
Steve Pridemore
Venkat T Jagaduri
Added 2011-Dec-07
emailBean : Send DominoDocument HTML Emails c/w Embedded Images, Attachments, Custom Header/Footer
Use the emailBean to create and send HTML/MIME emails based on a DominoDocument datasource. Use CKEditor bound to the datasource to compose the email content that can also include Embedded Images. Use the File Upload bound to the datasource to also include Attachments in the email. You can also specify your own custom Header and Footer (Signature) HTML content for the email.
Example:
emailBean.setSendTo("frank@renovations.com");
emailBean.setSubject("Todays Finance Report");
emailBean.setSenderEmail("samantha@renovations.com");
emailBean.setSenderName("Samantha - Renovations");
emailBean.setDocument(document1);
emailBean.setFieldName("Body");
emailBean.setBannerHTML("Hi,
");
emailBean.setFooterHTML("Kind regards,
Samantha
0012 3456 789
");
emailBean.send();
XPages
Tony McGuckin
Overall rating is 5.00 by 9 person(s)
You have to login first to use 'My Favorites' feature
14 user(s) has marked as favorite:
Angelo Pampalone
Cristian DAloisio
Dwain A Wuerfel
Grégory DEVISE
Jan1 Krunniniva
Joe L Bedolla
Leonardo Bertelli LB Bertelli
Marco Gajardo
Michele Malaguti
Mikael Grevsten
Serdar Basegmez
Son T Le
Terry Traphagen
Ulrich Krause
Added 2012-Apr-04
Sorting a NotesDocumentCollection by multiple field values
Also available on http://per.lausten.dk/blog/2006/10/sorting-notesdocumentcollection-by.html
LotusScript
Per Henrik Lausten
Overall rating is 5.00 by 5 person(s)
You have to login first to use 'My Favorites' feature
6 user(s) has marked as favorite:
charles a ross
Guenter Tscharf
Henry - Xu
jimmy fan
Juan Ángel Celdrán Román
Rainer Fesslmeier
Added 2011-Dec-09
LtpaToken Generator for Multi-server SSO Configurations
This Java class generates a valid LtpaToken valid for any user name.
When using, you should sign the database with a user that is listed as 'Owner' or 'Administrator' in the SSO configuration. This version only supports Domino keys. Tokens imported from Websphere will not generate valid tokens. Since WAS token generation is not based on public API, it doesn't seem possible to do it without native libraries.
This class can be used for any customized login operations. You may specify any user with any name while creating the token.
UPDATE on 9th July, 2012:
- LMBCS encoding support has been added (see comments for details)
Java
Serdar Basegmez
Overall rating is 4.42 by 12 person(s)
You have to login first to use 'My Favorites' feature
6 user(s) has marked as favorite:
Eric N McCormick
Guglielmo Farina
Michele Malaguti
Serdar Basegmez
Steve Cochrane
Vikas Tiwari
Added 2012-May-26
Send Notes document as PDF attachment
This script is ideally placed on a form and allows the user to mail entire document as a PDF. The logic is as follows
- Copy and Paste UI doc into a temporary MS Word object
- Save MS Word as PDF
- Closes MS Word OLE Object
- Opens new mail & attaches PDF file
- Kills temporary file
LotusScript
Ben Menesi
Overall rating is 5.00 by 7 person(s)
You have to login first to use 'My Favorites' feature
2 user(s) has marked as favorite:
Erskine Harris
Wanda M Rosioara
Added 2015-May-19
Use @Transform to build JSON and consume the output in an XAgent
An FAST and easy way to build a complex JSON String / (Almost) No need to calculate at runtime.
Can be used i.e. in the xGrid project http://www.openntf.org/Internal/home.nsf/project.xsp?databaseName=CN=NotesOSS2/O=NotesOSS!!Projects\pmt.nsf&documentId=8147C9C5EC59C08E86257A0C006FD1F8&action=openDocument
JavaScript (Server)
Ulrich Krause
Overall rating is 4.67 by 6 person(s)
You have to login first to use 'My Favorites' feature
5 user(s) has marked as favorite:
Dani Soft
Dwain A Wuerfel
jimmy fan
Venkatesh Ramasamy
Vikas Tiwari
Added 2012-Jun-01
Hack to use jQuery AMD widgets and Dojo together
The Dojo AMD loader in Xpages is causing issues with newer jQuery widgets. Examples with issues are jQuery Mobile, Select2 v4.0.0 and Bootbox (modal alert boxes).
Mark Roden blogged about this issue here: http://xomino.com/2015/06/02/select2-v4-needs-amd-fixing-in-domino-r9-xpages/
But what if you don't want to use "resource aggregation" and also don't want to manually edit these Javascripts? This is an alternative option.
The first script tag will temporary disable the Dojo AMD loader by removing "define.amd". After this script tag you should add all jQuery widgets that cause issues.
Last step is to add the a script tag to restore de Dojo AMD loader. That's it!
XPages
F. Kranenburg
Overall rating is 4.78 by 18 person(s)
You have to login first to use 'My Favorites' feature
6 user(s) has marked as favorite:
Angelo Pampalone
B Gleeson
Dan Soares
Eric McCormick
Peter Janzen
Steve Cochrane
Added 2015-Jun-03
How to access CGI variables in XPages
This snippet was written by Thomas Gumz in 2008, as part of the following wiki article: http://www-10.lotus.com/ldd/ddwiki.nsf/dx/xpages-cgi-variables.htm
Question:
In the traditional Domino web server, CGI variables are available by creating fields with the names of such CGI variables, for example QUERY_STRING
How can I easily access CGI variables in XPages?
Answer:
In XPages, CGI variables are also available, but you need to write some code to get them via the JSF context.
First you need to call facesContext.getExternalContext() which returns an http://java.sun.com/javaee/javaserverfaces/1.0/docs/api/javax/faces/context/ExternalContext.html" target="_blank">ExternalContext object
Next, you need to get the http://java.sun.com/j2ee/1.4/docs/api/javax/servlet/http/HttpServletRequest.html" target="_blank">servlet request by calling getRequest() on the ExternalContext object
Then you can call various .getXYZ() methods of the request object to retrieve the values of CGI variables.
For example, to retrieve the remote IP address of a browser session, use request.getRemoteAddr()
Here is a complete, functional JavasScript example of how to get and print the remote address of the incoming browser request:
print("Remote Address: " + facesContext.getExternalContext().getRequest().getRemoteAddr());
XPages
B Gleeson
Overall rating is 5.00 by 1 person(s)
You have to login first to use 'My Favorites' feature
2 user(s) has marked as favorite:
Bhaskar Arkal
Eric Tomenga
Added 2015-Nov-06
Keeping your XPage session alive – without keepSessionAlive
There appears to be an issue keeping XPage sessions alive – even with the ExtLib keepSessionAlive control – which keeps the web session alive from the server’s perspective but does not keep the XPages session alive.
This is a solution which works – especially for those people who are unable to use the Extension Library Add the following to the bottom of your XPage and what it will do is refresh the XP:DIV periodically based on your setting (in milliseconds) (3000000 = 3000 seconds = 50 minutes)
You need to set a value at least one minute less than the session timeout length set in the application properties for your database.
See - http://xomino.com/2012/09/13/keeping-your-xpage-session-alive-without-keepsessionalive/ for more detail
JavaScript (Client)
mark roden
Overall rating is 4.75 by 4 person(s)
You have to login first to use 'My Favorites' feature
2 user(s) has marked as favorite:
Eric N McCormick
Marco Gajardo
Added 2012-Sep-14
Get SessionID in SSJS
Returns the id of current session
JavaScript (Server)
Sven Hasselbach
Overall rating is 4.00 by 3 person(s)
You have to login first to use 'My Favorites' feature
So far, no one has added to favorites
Added 2011-Dec-12
Save Datasource & Fire querySave/postSave events
If you are saving a datasource via document1.save(), the querySave / postSave-events will not be executed.
To fix this, you have to use the save() method of com.ibm.xsp.model.domino.DominoDocumentData instead.
The variable dsName contains the name of your datasource followed by ".DATASOURCE". To use it f.e. with current document, you have to change to "currentDocument.DATASOURCE".
More details can be found here:
http://stackoverflow.com/questions/9735648/save-method-on-datasource-does-not-fire-querysave-postsave-events
JavaScript (Server)
Sven Hasselbach
Overall rating is 5.00 by 2 person(s)
You have to login first to use 'My Favorites' feature
1 user(s) has marked as favorite:
Eric McCormick
Added 2012-Apr-17
View Panel Column CSJS Partial Refresh issuing POST request with params and immediate option
Simple example demonstrating use of the CSJS XSP.partialRefreshPost function to issue a POST request c/w request params from a View Panel column onclick event. Note this can be used to execute ALL SIX lifecycle phases or a subset when using the partial execution and/or immediate param options.
XPages
Tony McGuckin
You have to login first to use 'My Favorites' feature
3 user(s) has marked as favorite:
Bruce Elgort
Tom MC Mennes
V. Watson
Added 2012-Jul-31
Magic Button by Tim Tripcony
Source: Tim Tripcony, 2008 - https://web.archive.org/web/20160121234622/http://avatar.red-pill.mobi/tim/blog.nsf/d6plinks/TTRY-7DZ4GX
Magic button is a formula to be added as a toolbar button in Notes which provides ability to change field value for any field on selected document.
"For as long as I can remember (possibly 2001) I've always maintained some variation on a SmartIcon toolbar button that a former coworker called the "magic button": it allows new fields to be added to a document and existing fields to be overridden or deleted from the document, either while editing the document or while it's selected in a view. I've seen various approaches to this basic concept over the years, and each time I install Notes on another computer, I either consult the Google to find one I've used before or just reconstruct it from memory. It finally occurred to me that if I just posted the one I'm currently using here, not only would it be easier for me to find later, but some of you might find it useful as well. So here's the current incarnation of said magic button..."
#CodeForTim
Formula
Serdar Basegmez
Overall rating is 5.00 by 3 person(s)
You have to login first to use 'My Favorites' feature
1 user(s) has marked as favorite:
Jinsun Jeong
Added 2022-Feb-21
Pretty print JSON in LotusScript
You can use this code to format a JSON string, it does not add any colors, it only add indentation.
in my case I do an api call and store the response in a notes field so that user easier can read the response
Tested on 12.0.2, if it is not working you may need to add gson to your scriptlibrary
LotusScript
Thomas Adrian
You have to login first to use 'My Favorites' feature
So far, no one has added to favorites
Added 2023-Mar-31
Check if a document is readonly for current user in LotusScript
LotusScript
Karsten Lehmann
You have to login first to use 'My Favorites' feature
So far, no one has added to favorites
Added 2025-Oct-01