dominoGuru.com

Your Development & Design Resource

Creating Notes Client Mail and Calendar NotesURLs with XPage Link Controls or Traditional HTML A Elements

I was recently asked by a fellow IBM Lotus Notes Domino application developer [and reader of the site] a question that -- surprisingly -- took some research to uncover. The question, in summary, was this:

Using XPages -- either in the Lotus Notes Client or Web Browser Client -- is there a way to create a simple link to the user's mail file that will launch in the Lotus Notes client?

My first thought was to use a Notes URL [ie., Notes://ServerName/db.nsf] that would be dynamically built using SSJS to lookup the OS filename of the active/authenticated user from their Domino Directory Person document.

That technique is flawed quite frankly, so I thought I'd create a simple XPages XAgent to control the Content-Type and spit out an NDL link... which is equally flawed [if not moreso].

So I did some research, and found a reserved ReplicaID which will always resolve to the user's active Mail database in the Lotus Notes Client based on the Location document. This'll work perfectly!

Notes:///0000000000000E00/

Give that a try, and it should open your Inbox. It's simple, and something that can be used both in XPages and Traditional IBM Lotus Notes Client and Domino Web Application Development techniques.

Hell, it could be used by anything really, from an in-house CMS to a external/off-premises cloud service... there's no reason you can't employ this NotesURL to give a quick link to the user mail database that'll launch in the Lotus Notes Client.

But you might be asking just how useful such a thing can be...

Consider these links, both XPages Link Controls and Traditional-friendly HTML A Elements:

<div>
    <fieldset>
        <legend>XPage Controls</legend>

        <xp:link escape="true" text="Simple Mail Link" id="mail"
            value="Notes:///0000000000000E00/">
        </xp:link>
           
        <xp:link escape="true" text="My Sent Folder Link" id="sent"
            value="Notes:///0000000000000E00/(Sent)?OpenView">
        </xp:link>
           
        <xp:link escape="true" text="New Memo Link" id="memo"
            value="Notes:///0000000000000E00/Memo?OpenForm">
        </xp:link>
       
        <xp:link escape="true" text="My Calendar Link" id="calendar"
            value="Notes:///0000000000000E00/Calendar?OpenView">
        </xp:link>
       
        <xp:link escape="true" text="New Calendar Link" id="appointment"
            value="Notes:///0000000000000E00/Appointment?OpenForm">
        </xp:link>
           
    </fieldset>
       
    <fieldset>
        <legend>Traditional HTML</legend>
           
        <a href="Notes:///0000000000000E00/">Simple Mail Link</a>
       
        <a href="Notes:///0000000000000E00/(Sent)?OpenView">My Sent Folder Link</a>
       
        <a href="Notes:///0000000000000E00/Memo?OpenForm">New Memo Link</a>

        <a href="Notes:///0000000000000E00/Calendar?OpenView">My Calendar Link</a>
       
        <a href="Notes:///0000000000000E00/Appointment?OpenForm">New Calendar Link</a>
           
    </fieldset>
       
</div>

Check this quick demo I've setup to see them in action.

Adding simple Notes:///0000000000000E00/[DesignElement]?Open[DesignElement] calls to the NotesURL can actually make these functional, from creating a new calendar entry, opening your calendar, or even viewing your sent email messages.

Sadly, you can't preload content via a NotesURL... and there are of course mailto-URLs and iCal files to handle both the mail and calendar... but this technique is another example of yet-another-way to provide functionality to your users.


About the author: Chris Toohey

Thought Leadership, Web & Mobile Application Development, Solutions Integration, Technical Writing & Mentoring

A published developer and webmaster of dominoGuru.com, Chris Toohey specializes in platform application development, solutions integration, and evangelism of platform capabilities and best practices.



More from dominoGuru.com


dominoGuru.com is powered by IBM Notes Domino XPages & hosted by Prominic.NET

Contact Us

Use our Contact / Feedback form or one of these email addresses:

Creative Commons License

Except where otherwise noted, dominoGuru.com by Chris Toohey is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.